question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

All tests fail running py.test on RaspberryPi3

See original GitHub issue

Hi, I’m trying to make this work on a RaspberryPi3 running latest Rasbian “jessie”. I’ve eventually managed to install everything properly (without failures) but in the final step of running the py.test I get all errors.

(venv3) pi@raspberrypi:~/Tools/mitmproxy $ py.test
=========================================================== test session starts ============================================================
platform linux -- Python 3.4.2, pytest-3.0.3, py-1.4.31, pluggy-0.4.0
rootdir: /home/pi/Tools/mitmproxy, inifile: setup.cfg
plugins: xdist-1.15.0, timeout-1.0.0, faulthandler-1.3.0, cov-2.4.0
collected 10 items / 85 errors

================================================================== ERRORS ==================================================================
___________________________________________ ERROR collecting test/mitmproxy/test_addonmanager.py ___________________________________________
ImportError while importing test module '/home/pi/Tools/mitmproxy/test/mitmproxy/test_addonmanager.py'.
Original error message:
'No module named 'typing''
Make sure your test modules/packages have valid Python names.
______________________________________________ ERROR collecting test/mitmproxy/test_certs.py _______________________________________________
ImportError while importing test module '/home/pi/Tools/mitmproxy/test/mitmproxy/test_certs.py'.
Original error message:
'No module named 'typing''
Make sure your test modules/packages have valid Python names.
...

I have no idea what is the problem and I also have no idea what are the correct dependencies and requirements. They are very vague at best. The project would certainly benefit from better installation instructions and clearly state the various dependencies. For example , there is no place mentioned that Pillow fails because, wheel fails, because libjpeg-dev is not mentioned as a dependency, nor automatically installed. There are several of these similar issues.

So what am I missing to get these tests working?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Kriechicommented, Oct 22, 2016

@E3V3A the tests should pass with old & newer versions of openssl. I think you can ignore these warnings, as long as the test does NOT fail.

0reactions
E3V3Acommented, Oct 22, 2016

Also the openssl dependency seem too recent…

test/mitmproxy/test_dump.py ..ALPN support missing (OpenSSL 1.0.2+ required)!
HTTP/2 is disabled. Use --no-http2 to silence this warning.
ALPN support missing (OpenSSL 1.0.2+ required)!
HTTP/2 is disabled. Use --no-http2 to silence this warning.
ALPN support missing (OpenSSL 1.0.2+ required)!
HTTP/2 is disabled. Use --no-http2 to silence this warning.
............

The currently stable apt version for openssl is:

openssl/stable,now 1.0.1t-1+deb8u5 armhf [installed,automatic]
  Secure Sockets Layer toolkit - cryptographic utility

The test.py takes ~8 minutes. It might be informative to the users to know about the approximate run times when running on RPi’s.

Read more comments on GitHub >

github_iconTop Results From Across the Web

py.test doesn't *seem* to run all tests - and doesn't fail
I've been following a tutorial, and have got the code to work, although the problem that I seem to have is - there...
Read more >
Pi3 incorrect results under load (possibly heat related)
I've run this test on all models of Pi (a+, b+, 2b, compute-node) and it only fails on my pi-3. It's definitely not...
Read more >
Second test fails when run with first, but passes when ... - GitHub
I created a Gist here that recreates the error I'm having. ... Since pytest doesn't re-import code for each run, the same class...
Read more >
Common errors using the Raspberry Pi camera module
Are you trying to use the Raspberry Pi camera module, Python, and the picamera library? Did you run in to an error message?...
Read more >
Python Unit Test And Some CI via GitLab (Python)
A post looking at Python Unit Tests and GitLab CI.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found