andrews4s / unpyc37

Decompiler for Python 3.7 (forked from https://github.com/figment/unpyc3)
GNU General Public License v3.0
57 stars 19 forks source link

How does one run the tests? #19

Open mycroftjr opened 5 hours ago

mycroftjr commented 5 hours ago

I might just be dumb, but how does one run the tests? I get errors like "f is not defined" and such when I try...

andrews4s commented 3 hours ago

Hi @mycroftjr, I used PyCharm CE for this and right-clicked syntax_test_all.py and select "Run python tests in syntax_test_all". You can also run from the command line from the project root:

PYTHONPATH=$(pwd)/tests:$(pwd)/tests/unit:$(pwd) python3 -m pytest tests/unit/syntax_test_all.py

mycroftjr commented 2 hours ago

And I assume that most of the tests pass at the moment? At the moment, all 30 unpyc3_test.py fail and 8 of the 174 syntax tests fail.

andrews4s commented 1 hour ago

The unpyc3_test is the outdated test from the original unpyc3 project I forked this from and is not one I ever ran to verify things. When I run the syntax tests, only 2 of 174 fail. One of them still produces functional code and the other I never got around to fixing.