Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TC for #138 #143

Merged
merged 4 commits into from
Aug 16, 2024
Merged

Add TC for #138 #143

merged 4 commits into from
Aug 16, 2024

Conversation

greenozon
Copy link
Contributor

My first TC ever in this repo
please review and give green go or yellow/red card :)

@rocky
Copy link
Owner

rocky commented Aug 14, 2024

I think you are missing a trailing newline at the end of pytest/testdata/03_annotations-3.7.right

@greenozon
Copy link
Contributor Author

maybe it needs 2 newlines in the file end?
I"ve added just one above

@rocky
Copy link
Owner

rocky commented Aug 14, 2024

Here's how to fix. Run your test on one of the failing os's - ubuntu or osx. It should fail but there is a file called xxx.got left in the pytest directory. Move and rename that to the corresponding "right" file: pytest/testdata/03_annotations-3.7.right

@greenozon
Copy link
Contributor Author

Thanks for the great tip! I didn't know that super tip
I was composing (well, copy-pasting) the output of .right by hands....
will do today!

@greenozon
Copy link
Contributor Author

hmm strange things are going on...

so I tried Ubuntu 22 and ... I see 0 issues:

python3 -m pytest pytest
============================================================================================ test session starts ============================================================================================
platform linux -- Python 3.10.12, pytest-8.3.2, pluggy-1.5.0
rootdir: /home/usr/Downloads/python-xdis
configfile: pyproject.toml
collected 34 items                                                                                                                                                                                          

pytest/test_bytecode.py ..                                                                                                                                                                            [  5%]
pytest/test_codetype.py .                                                                                                                                                                             [  8%]
pytest/test_cross_dis.py .                                                                                                                                                                            [ 11%]
pytest/test_disasm.py ........                                                                                                                                                                        [ 35%]
pytest/test_instructions.py ..                                                                                                                                                                        [ 41%]
pytest/test_load_file.py .                                                                                                                                                                            [ 44%]
pytest/test_magic.py .                                                                                                                                                                                [ 47%]
pytest/test_opcode.py .                                                                                                                                                                               [ 50%]
pytest/test_stack_effect.py ..                                                                                                                                                                        [ 55%]
pytest/test_std.py ............s..                                                                                                                                                                    [100%]

======================================================================================= 33 passed, 1 skipped in 0.37s =======================================================================================
[tplevo347] ~/Downloads/python-xdis [(master ?:1*)]» uname -a
Linux tplevo347 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
[tplevo347] ~/Downloads/python-xdis [(master ?:1*)]» python3 -V
Python 3.10.12
[tplevo347] ~/Downloads/python-xdis [(master ?:1*)]» cat /etc/issue
Ubuntu 22.04.4 LTS \n \l

[tplevo347] ~/Downloads/python-xdis [(master ?:1*)]» git pull
Already up to date.

any clues how could get the .got file?

  1. I've tried to run TCs and was looking for *.got files but found nothing..
    should I specify some flag or smth else get those available?

@greenozon
Copy link
Contributor Author

I've setup also python 3.8 venv and.. its even better - 100% pass rate, eg:

python -m pytest pytest
============================================================================================ test session starts ============================================================================================
platform linux -- Python 3.8.19, pytest-8.3.2, pluggy-1.5.0
rootdir: /home/usr/Downloads/python-xdis
configfile: pyproject.toml
collected 34 items                                                                                                                                                                                          

pytest/test_bytecode.py ..                                                                                                                                                                            [  5%]
pytest/test_codetype.py .                                                                                                                                                                             [  8%]
pytest/test_cross_dis.py .                                                                                                                                                                            [ 11%]
pytest/test_disasm.py ........                                                                                                                                                                        [ 35%]
pytest/test_instructions.py ..                                                                                                                                                                        [ 41%]
pytest/test_load_file.py .                                                                                                                                                                            [ 44%]
pytest/test_magic.py .                                                                                                                                                                                [ 47%]
pytest/test_opcode.py .                                                                                                                                                                               [ 50%]
pytest/test_stack_effect.py ..                                                                                                                                                                        [ 55%]
pytest/test_std.py ...............                                                                                                                                                                    [100%]

============================================================================================ 34 passed in 0.49s ============================================================================================

any additional clues please?...

@rocky rocky merged commit 025b797 into rocky:master Aug 16, 2024
4 of 10 checks passed
@rocky
Copy link
Owner

rocky commented Aug 16, 2024

When I ran on I got an error and when I got the error it had the additional file in it.

If a test succeeds then it doesn't include the "got" file.

At any rate I think your changes have now all been merged in. Thanks for the work!

Please double check though to make sure there isn't still a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants