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

Don't install tests #1710

Merged
merged 1 commit into from
Nov 3, 2020
Merged

Don't install tests #1710

merged 1 commit into from
Nov 3, 2020

Conversation

scop
Copy link
Contributor

@scop scop commented Oct 23, 2020

They're not needed at runtime.

Copy link
Collaborator

@peternewman peternewman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @scop .

Agree in principal, however please see the discussion in here where we're talking about moving some of the current test functionality into the main codebase to validate custom dictionaries:
https://github.com/codespell-project/codespell/pull/1669/files/654599a6cdcffa7a74bb8da8d223adbc4f23bdb6#diff-7b3ed02bc73dc06b7db906cf97aa91dec2b2eb21f2d92bc5caa761df5bbc168f

Are you interested in having a go at that?

@scop
Copy link
Contributor Author

scop commented Oct 25, 2020

Not really at this point, sorry.

@larsoner
Copy link
Member

larsoner commented Nov 3, 2020

Most repos I work on do include tests in their distributions. However, I'm not sure it's necessary. Let's try it and we can easily revert if needed

@larsoner larsoner merged commit 7cec576 into codespell-project:master Nov 3, 2020
@scop scop deleted the dont-install-tests branch November 4, 2020 15:58
@DimitriPapadopoulos
Copy link
Collaborator

Most repos I work on do include tests in their distributions. However, I'm not sure it's necessary.

@larsoner Did you think of source distributions such as sdist (which certainly must include tests), or binary distributions such as wheel (which are supposed to exclude tests)?

@larsoner It looks like #2523 broke this, tests are again included by wheel binary distributions:

codespell-2.2.2-py3-none-any.whl contains tests/test_*.py files
$ wget https://files.pythonhosted.org/packages/43/01/531465983005a3fd3d221f265380f99d43e4618f9a134d0f710e3e1ea158/codespell-2.2.2-py3-none-any.whl
--2022-11-17 15:53:13--  https://files.pythonhosted.org/packages/43/01/531465983005a3fd3d221f265380f99d43e4618f9a134d0f710e3e1ea158/codespell-2.2.2-py3-none-any.whl
Résolution de files.pythonhosted.org (files.pythonhosted.org)… 151.101.121.63, 2a04:4e42:1d::319
Connexion à files.pythonhosted.org (files.pythonhosted.org)|151.101.121.63|:443… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : 214829 (210K) [application/octet-stream]
Enregistre : «codespell-2.2.2-py3-none-any.whl»

codespell-2.2.2-py3-none-any.whl 100%[==========================================================>] 209,79K  --.-KB/s    ds 0,03s   

2022-11-17 15:53:13 (7,30 MB/s) - «codespell-2.2.2-py3-none-any.whl» enregistré [214829/214829]

$ 
$ unzip -t codespell-2.2.2-py3-none-any.whl
Archive:  codespell-2.2.2-py3-none-any.whl
    testing: bin/codespell            OK
    testing: codespell_lib/__init__.py   OK
    testing: codespell_lib/__main__.py   OK
    testing: codespell_lib/_codespell.py   OK
    testing: codespell_lib/_version.py   OK
    testing: codespell_lib/data/__init__.py   OK
    testing: codespell_lib/data/dictionary.txt   OK
    testing: codespell_lib/data/dictionary_code.txt   OK
    testing: codespell_lib/data/dictionary_en-GB_to_en-US.txt   OK
    testing: codespell_lib/data/dictionary_informal.txt   OK
    testing: codespell_lib/data/dictionary_names.txt   OK
    testing: codespell_lib/data/dictionary_rare.txt   OK
    testing: codespell_lib/data/dictionary_usage.txt   OK
    testing: codespell_lib/data/linux-kernel.exclude   OK
    testing: codespell_lib/tests/__init__.py   OK
    testing: codespell_lib/tests/test_basic.py   OK
    testing: codespell_lib/tests/test_dictionary.py   OK
    testing: codespell-2.2.2.dist-info/COPYING   OK
    testing: codespell-2.2.2.dist-info/METADATA   OK
    testing: codespell-2.2.2.dist-info/WHEEL   OK
    testing: codespell-2.2.2.dist-info/entry_points.txt   OK
    testing: codespell-2.2.2.dist-info/top_level.txt   OK
    testing: codespell-2.2.2.dist-info/RECORD   OK
No errors detected in compressed data of codespell-2.2.2-py3-none-any.whl.
$ 

@larsoner
Copy link
Member

I think it's fine to include them, so I don't mind having them in there / effectively reverting this. They are small and don't really do any harm AFAIK. And as above, many projects do include them, so maybe there are some advantages (e.g., being able to test that your particular installation passes all tests)

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.

4 participants