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

Include vectors.json in sdist #112

Closed
hegjon opened this issue Aug 11, 2023 · 5 comments · Fixed by #113
Closed

Include vectors.json in sdist #112

hegjon opened this issue Aug 11, 2023 · 5 comments · Fixed by #113

Comments

@hegjon
Copy link
Contributor

hegjon commented Aug 11, 2023

vectors.json is needed for users to run all the tests.

This is useful for Linux distroes that redistribute packages built from sdist that want to run the tests as part of the packaging.

@prusnak
Copy link
Member

prusnak commented Aug 11, 2023

Do we package tests in the sdist?

@hegjon
Copy link
Contributor Author

hegjon commented Aug 11, 2023

Yes

@hegjon
Copy link
Contributor Author

hegjon commented Aug 11, 2023

❯ tar xvzf mnemonic-0.20.tar.gz
mnemonic-0.20/
mnemonic-0.20/AUTHORS
mnemonic-0.20/CHANGELOG.rst
mnemonic-0.20/LICENSE
mnemonic-0.20/MANIFEST.in
mnemonic-0.20/PKG-INFO
mnemonic-0.20/README.rst
mnemonic-0.20/setup.cfg
mnemonic-0.20/setup.py
mnemonic-0.20/src/
mnemonic-0.20/src/mnemonic/
mnemonic-0.20/src/mnemonic/__init__.py
mnemonic-0.20/src/mnemonic/mnemonic.py
mnemonic-0.20/src/mnemonic/py.typed
mnemonic-0.20/src/mnemonic/wordlist/
mnemonic-0.20/src/mnemonic/wordlist/chinese_simplified.txt
mnemonic-0.20/src/mnemonic/wordlist/chinese_traditional.txt
mnemonic-0.20/src/mnemonic/wordlist/english.txt
mnemonic-0.20/src/mnemonic/wordlist/french.txt
mnemonic-0.20/src/mnemonic/wordlist/italian.txt
mnemonic-0.20/src/mnemonic/wordlist/japanese.txt
mnemonic-0.20/src/mnemonic/wordlist/korean.txt
mnemonic-0.20/src/mnemonic/wordlist/spanish.txt
mnemonic-0.20/src/mnemonic.egg-info/
mnemonic-0.20/src/mnemonic.egg-info/PKG-INFO
mnemonic-0.20/src/mnemonic.egg-info/SOURCES.txt
mnemonic-0.20/src/mnemonic.egg-info/dependency_links.txt
mnemonic-0.20/src/mnemonic.egg-info/not-zip-safe
mnemonic-0.20/src/mnemonic.egg-info/top_level.txt
mnemonic-0.20/tests/
mnemonic-0.20/tests/test_mnemonic.py
mnemonic-0.20/tools/
mnemonic-0.20/tools/generate_vectors.py
mnemonic-0.20/tox.ini

jonny in python-mnemonic on  rawhide [$?]
❯ cd mnemonic-0.20/

jonny in python-mnemonic/mnemonic-0.20 on  rawhide [$?] via 🐍 v3.11.4
❯ pytest
===================================== test session starts =====================================
platform linux -- Python 3.11.4, pytest-7.2.2, pluggy-1.0.0
rootdir: /home/jonny/fedora-scm/python-mnemonic/mnemonic-0.20
plugins: forked-1.4.0, cov-4.0.0, xdist-3.1.0
collected 7 items

tests/test_mnemonic.py ......F                                                          [100%]

========================================== FAILURES ===========================================
__________________________________ MnemonicTest.test_vectors __________________________________

self = <test_mnemonic.MnemonicTest testMethod=test_vectors>

    def test_vectors(self) -> None:
>       with open("vectors.json", "r") as f:
E       FileNotFoundError: [Errno 2] No such file or directory: 'vectors.json'

tests/test_mnemonic.py:45: FileNotFoundError
=================================== short test summary info ===================================
FAILED tests/test_mnemonic.py::MnemonicTest::test_vectors - FileNotFoundError: [Errno 2] No such file or directory: 'vectors.json'
================================= 1 failed, 6 passed in 0.27s =================================

@hegjon
Copy link
Contributor Author

hegjon commented Aug 11, 2023

Tests are not distributed to end-users, only used during build:

❯ rpm -qlp python3-mnemonic-0.20-8.fc38.noarch.rpm
/usr/lib/python3.11/site-packages/mnemonic
/usr/lib/python3.11/site-packages/mnemonic-0.20.dist-info
/usr/lib/python3.11/site-packages/mnemonic-0.20.dist-info/AUTHORS
/usr/lib/python3.11/site-packages/mnemonic-0.20.dist-info/INSTALLER
/usr/lib/python3.11/site-packages/mnemonic-0.20.dist-info/LICENSE
/usr/lib/python3.11/site-packages/mnemonic-0.20.dist-info/METADATA
/usr/lib/python3.11/site-packages/mnemonic-0.20.dist-info/WHEEL
/usr/lib/python3.11/site-packages/mnemonic-0.20.dist-info/top_level.txt
/usr/lib/python3.11/site-packages/mnemonic/__init__.py
/usr/lib/python3.11/site-packages/mnemonic/__pycache__
/usr/lib/python3.11/site-packages/mnemonic/__pycache__/__init__.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/mnemonic/__pycache__/__init__.cpython-311.pyc
/usr/lib/python3.11/site-packages/mnemonic/__pycache__/mnemonic.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/mnemonic/__pycache__/mnemonic.cpython-311.pyc
/usr/lib/python3.11/site-packages/mnemonic/mnemonic.py
/usr/lib/python3.11/site-packages/mnemonic/py.typed
/usr/lib/python3.11/site-packages/mnemonic/wordlist
/usr/lib/python3.11/site-packages/mnemonic/wordlist/chinese_simplified.txt
/usr/lib/python3.11/site-packages/mnemonic/wordlist/chinese_traditional.txt
/usr/lib/python3.11/site-packages/mnemonic/wordlist/english.txt
/usr/lib/python3.11/site-packages/mnemonic/wordlist/french.txt
/usr/lib/python3.11/site-packages/mnemonic/wordlist/italian.txt
/usr/lib/python3.11/site-packages/mnemonic/wordlist/japanese.txt
/usr/lib/python3.11/site-packages/mnemonic/wordlist/korean.txt
/usr/lib/python3.11/site-packages/mnemonic/wordlist/spanish.txt
/usr/share/doc/python3-mnemonic
/usr/share/doc/python3-mnemonic/AUTHORS
/usr/share/doc/python3-mnemonic/CHANGELOG.rst
/usr/share/doc/python3-mnemonic/README.rst
/usr/share/licenses/python3-mnemonic
/usr/share/licenses/python3-mnemonic/LICENSE

@prusnak
Copy link
Member

prusnak commented Aug 12, 2023

Can you try to provide a PR with a fix?

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 a pull request may close this issue.

2 participants