Errors running tests
See original GitHub issueSteps to reproduce the problem:
python setup.py pytest
Output:
==================================== ERRORS ====================================
________________________ ERROR at setup of test_mitmweb ________________________
file /build/mitmproxy-git/src/mitmproxy/test/mitmproxy/tools/test_main.py, line 9
def test_mitmweb(event_loop, tdata):
E fixture 'event_loop' not found
> available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_xml_attribute, record_xml_property, recwarn, tdata, tmpdir, tmpdir_factory
> use 'pytest --fixtures [testpath]' for help on them.
/build/mitmproxy-git/src/mitmproxy/test/mitmproxy/tools/test_main.py:9
_______________________ ERROR at setup of test_mitmdump ________________________
file /build/mitmproxy-git/src/mitmproxy/test/mitmproxy/tools/test_main.py, line 18
def test_mitmdump(event_loop, tdata):
E fixture 'event_loop' not found
> available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_xml_attribute, record_xml_property, recwarn, tdata, tmpdir, tmpdir_factory
> use 'pytest --fixtures [testpath]' for help on them.
/build/mitmproxy-git/src/mitmproxy/test/mitmproxy/tools/test_main.py:18
python setup.py pytest
Output:
Exception in thread WebsocketFrameReader:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/build/mitmproxy-git/src/mitmproxy/pathod/pathoc.py", line 128, in run
r, _, _ = select.select([self.rfile], [], [], 0.05)
ValueError: file descriptor cannot be a negative integer (-1)
Any other comments? What have you tried so far?
- I ran
pytest --fixtures
Output:
---------------------------------------------------------------------------------------- fixtures defined from test.conftest ----------------------------------------------------------------------------------------
tdata
build/mitmproxy-git/src/mitmproxy/test/conftest.py:41: no docstring available
------------------------------------------------------------------------------ fixtures defined from test.mitmproxy.addons.test_export ------------------------------------------------------------------------------
get_request
build/mitmproxy-git/src/mitmproxy/test/mitmproxy/addons/test_export.py:15: no docstring available
post_request
build/mitmproxy-git/src/mitmproxy/test/mitmproxy/addons/test_export.py:26: no docstring available
patch_request
build/mitmproxy-git/src/mitmproxy/test/mitmproxy/addons/test_export.py:37: no docstring available
tcp_flow
build/mitmproxy-git/src/mitmproxy/test/mitmproxy/addons/test_export.py:44: no docstring available
------------------------------------------------------------------------------ fixtures defined from test.mitmproxy.tools.web.test_app ------------------------------------------------------------------------------
no_tornado_logging
build/mitmproxy-git/src/mitmproxy/test/mitmproxy/tools/web/test_app.py:19: no docstring available
----------------------------------------------------------------------------- fixtures defined from test.mitmproxy.addons.test_readfile -----------------------------------------------------------------------------
data
build/mitmproxy-git/src/mitmproxy/test/mitmproxy/addons/test_readfile.py:15: no docstring available
corrupt_data
build/mitmproxy-git/src/mitmproxy/test/mitmproxy/addons/test_readfile.py:33: no docstring available
------------------------------------------------------------------------------- fixtures defined from test.examples.test_xss_scanner --------------------------------------------------------------------------------
logger
build/mitmproxy-git/src/mitmproxy/test/examples/test_xss_scanner.py:308: no docstring available
System information
Latest from git (tag.revision.commit): 4.0.0.r93.7f464b892
(git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g;s/\.rc./rc/g'
)
I don’t know why 4.0.0
shows up as the tag.
Note
I am maintaining mitmproxy-git
in Arch Linux’s AUR repo. The packaging process runs tests by default. Committing to the repo without checking if the changes break the tests will break the package, please be careful when doing this. Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Error running unit tests on test projects - Visual Studio Feedback
I'm running on VisualStudio.16.Preview/16.2.0-pre.1.0+28917.182. The project has the following dependencies (added through Nuget): <PackageReference ...
Read more >Error running test with pytest #4334 - microsoft/vscode-python
I have a simple test scenario which yields some errors in vs code. I'm trying to run the following little program with the...
Read more >Handling the Error 'The test run has stopped...'
Open the test log and locate the “The test run has stopped...” message in it. The “The test run has stopped...” message is...
Read more >Error running Junit test from IntelliJ IDEA - Stack Overflow
I running a Junit test from IntelliJ IDEA, ...
Read more >Error when running tests. – IDEs Support (IntelliJ Platform)
I am getting this error when running either a Robot test or unit test. This is for an existing project. I started getting...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Kriechi, running
mitmproxy --version
only makes sense if I am having a problem after installing mitmproxy. Please read my post, the version showed has nothing to do with the internal mitmproxy version. I am definitely using the last commit. Please rungit describe --long --tags
in your local repo, you should reproduce it. I am not sure why git is using4.0.0
as the tag.@mhils
tox
doesn’t work for me. It goes downloading dependencies on its own and I can’t have that happening. Also,tox
expects a binary namedpython3.7
butpython
is only in3.6.6
. The solution for this seems easy, just add a docstring where it’s missing. I didn’t open a Pull Request because I am not involved in the development and I can’t be sure of the purpose of each function. If you don’t want to write documentation for those functions, just create an empty docstring. It would also be beneficial to addpython setup.py pytest
to travis as it should be compatible with tox (except that it checks the documentation?). I am maintaining a-git
package (installs latest version from git master) but if you want to the base package (mitmproxy
) to be updated in the official repository, this needs to be fixed. I might be able to do that (updatemitmproxy
) next week, I am just waiting for the results of my Trusted User application and I am optimistic 😄.@FFY00 yes,
git describe --long --tags
returns v4 - which is odd. But thats not what I was trying to explain: we have a dedicated file to generate meaningful version identifiers.You can simply run
python mitmproxy/version.py
and it will print the current version (without the number of ahead commits).If you want the full version identifier, then you should use the
get_dev_version
function in this file:python -c "from mitmproxy import version ; print(version.get_dev_version())"