Segfault when executing from pytest
See original GitHub issueDesired change
- Rule(s): NA
- Adjustment: This is a bug report, not an adjustment.
Explanation
When I execute flake8 using pytest like this pytest --flake8 --mypy I get the following segfault:
Current thread 0x00007ffff7ff4740 (most recent call first):
File "venv/lib/python3.6/site-packages/flake8_simplify.py",
line 941 in is_stmt_equal
File "venv/lib/python3.6/site-packages/flake8_simplify.py",
line 947 in is_stmt_equal
...
File "venv/lib/python3.6/site-packages/flake8_simplify.py",
line 947 in is_stmt_equal
File "venv/lib/python3.6/site-packages/flake8_simplify.py",
line 947 in is_stmt_equal
...
Segmentation fault
I know this error may not give enough information but I have no idea how to debug this. Also, I noticed this happens only in versions 0.12.0 to 0.14.1, but not in 0.11.0 and only with the exact parameters mentioned above. If for instance I run pytest --flake8 or just flake8 . --exclude venv the problem will not occur.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Pytest segmentation fault and test fail - python - Stack Overflow
When I run this test using the PyCharm test runner, I get the following result: In the list of running or executed tests...
Read more >Segmentation fault after test pytorch · Issue #8841 · pytest-dev ...
python 3.9, CentOS, I use pytest with pytorch, after test case runs success, I got Segmentation fault error, here is the case in...
Read more >Solved: segmentation fault while pytest - Atlassian Community
Old builds stopped working recently. We get a segmanatation fault in something related to pymongo / or maybe to tensorflow.
Read more >Sqlite segmentation fault regression when running tests (since ...
The segmentation fault occurs regardless of whether an in-memory or file-based database is used. When the file-based run crashes, the DB is around...
Read more >[#ARROW-5863] [Python] Segmentation Fault via pytest-runner
When running pytest on projects using pyarrow==0.14.0 on Linux, I am getting segmentation faults, but interestingly only when run via ...
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 Free
Top 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

Thanks for merging!
@scganterh can you confirm if https://github.com/MartinThoma/flake8-simplify/pull/69 solves your issue? I believe it should.
@MartinThoma is there anything else I would need to do to help merge this?