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

Test runs fail on second invocation #28

Closed
jaraco opened this issue Oct 22, 2020 · 7 comments
Closed

Test runs fail on second invocation #28

jaraco opened this issue Oct 22, 2020 · 7 comments

Comments

@jaraco
Copy link
Member

jaraco commented Oct 22, 2020

In GitLab by @jaraco on Dec 5, 2018, 24:46

Running tests the first time works fine:

importlib_metadata feature/file-enum $ tox -e py37-cov -r
py37-cov recreate: /Users/jaraco/code/public/importlib_metadata/.tox/py37-cov
py37-cov installdeps: coverage>=4.5, importlib_resources
py37-cov develop-inst: /Users/jaraco/code/public/importlib_metadata
py37-cov installed: You are using pip version 10.0.1, however version 18.1 is available.,You should consider upgrading via the 'pip install --upgrade pip' command.,coverage==4.5.2,-e git+gl://python-devs/importlib_metadata@59f0f3ad4c32d2b739d6f32658e9e4e04bf14ab9#egg=importlib_metadata,importlib-resources==1.0.2,zipp==0.3.2
py37-cov run-test-pre: PYTHONHASHSEED='2863425022'
py37-cov runtests: commands[0] | python -m coverage run --rcfile=/Users/jaraco/code/public/importlib_metadata/coverage.ini -m unittest discover
............/Users/jaraco/code/public/importlib_metadata/.tox/py37-cov/lib/python3.7/site-packages/pip/_vendor/urllib3/util/selectors.py:14: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import namedtuple, Mapping
/Users/jaraco/code/public/importlib_metadata/.tox/py37-cov/lib/python3.7/site-packages/pip/_vendor/urllib3/_collections.py:2: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Mapping, MutableMapping
/Users/jaraco/code/public/importlib_metadata/.tox/py37-cov/lib/python3.7/site-packages/pip/_vendor/pyparsing.py:3245: DeprecationWarning: Using or importing the ABCs from 'collections'instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  elif isinstance( exprs, collections.Iterable ):
.........
----------------------------------------------------------------------
Ran 21 tests in 0.434s

OK
py37-cov runtests: commands[1] | python -m coverage combine --rcfile=/Users/jaraco/code/public/importlib_metadata/coverage.ini
py37-cov runtests: commands[2] | python -m coverage html --rcfile=/Users/jaraco/code/public/importlib_metadata/coverage.ini
py37-cov runtests: commands[3] | python -m coverage xml --rcfile=/Users/jaraco/code/public/importlib_metadata/coverage.ini
py37-cov runtests: commands[4] | python -m coverage report -m --rcfile=/Users/jaraco/code/public/importlib_metadata/coverage.ini --fail-under=100
Name                                  Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------------------------------------
importlib_metadata/__init__.py            5      0      0      0   100%
importlib_metadata/_hooks.py             58      0     12      0   100%
importlib_metadata/api.py                68      0      8      0   100%
importlib_metadata/docs/__init__.py       0      0      0      0   100%
---------------------------------------------------------------------------------
TOTAL                                   131      0     20      0   100%
________________________________________________________________________________________ summary ________________________________________________________________________________________
  py37-cov: commands succeeded
  congratulations :)

Following the acceptance of !9, running the tests again, the tests fail when tox tries to get the project name:

importlib_metadata feature/file-enum $ tox -e py37-cov -v
using tox.ini: /Users/jaraco/code/public/importlib_metadata/tox.ini
using tox-3.5.3 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tox/__init__.py
py37-cov reusing: /Users/jaraco/code/public/importlib_metadata/.tox/py37-cov
  /Users/jaraco/code/public/importlib_metadata$ /Users/jaraco/code/public/importlib_metadata/.tox/py37-cov/bin/python /Users/jaraco/code/public/importlib_metadata/setup.py --name
Traceback (most recent call last):
  File "/Users/jaraco/code/public/importlib_metadata/setup.py", line 4, in <module>
    import setuptools_scm
ModuleNotFoundError: No module named 'setuptools_scm'
  /Users/jaraco/code/public/importlib_metadata$ /Users/jaraco/code/public/importlib_metadata/.tox/py37-cov/bin/python -m pip freeze >/Users/jaraco/code/public/importlib_metadata/.tox/py37-cov/log/py37-cov-5.log
py37-cov installed: You are using pip version 10.0.1, however version 18.1 is available.,You should consider upgrading via the 'pip install --upgrade pip' command.,coverage==4.5.2,-e git+gl://python-devs/importlib_metadata@bbea8c68fef5bd32bffe48f4580743b8af7ed483#egg=importlib_metadata,importlib-resources==1.0.2,zipp==0.3.2
________________________________________________________________________________________ summary ________________________________________________________________________________________
ERROR:   py37-cov: InvocationError for command '/Users/jaraco/code/public/importlib_metadata/.tox/py37-cov/bin/python /Users/jaraco/code/public/importlib_metadata/setup.py --name' (exited with code 1)

This issue is the same as the one I reported with tox a few days ago. I'm going to renew that conversation.

@jaraco
Copy link
Member Author

jaraco commented Oct 22, 2020

In GitLab by @jaraco on Dec 5, 2018, 24:46

changed the description

@jaraco
Copy link
Member Author

jaraco commented Oct 22, 2020

In GitLab by @jaraco on Dec 5, 2018, 03:21

mentioned in commit d58414f816d9e44ed7d3cffbe572b3803dc756f0

@jaraco
Copy link
Member Author

jaraco commented Oct 22, 2020

In GitLab by @jaraco on Dec 5, 2018, 03:24

mentioned in merge request !29

@jaraco
Copy link
Member Author

jaraco commented Oct 22, 2020

In GitLab by @jaraco on Dec 7, 2018, 01:36

mentioned in commit 556047d

@jaraco
Copy link
Member Author

jaraco commented Oct 22, 2020

In GitLab by @warsaw on Dec 7, 2018, 20:42

closed via merge request !29

@jaraco
Copy link
Member Author

jaraco commented Oct 22, 2020

In GitLab by @jaraco on Dec 7, 2018, 20:42

closed via commit 556047d

@jaraco
Copy link
Member Author

jaraco commented Oct 22, 2020

In GitLab by @warsaw on Dec 7, 2018, 20:42

mentioned in commit 92541f5

@jaraco jaraco closed this as completed Oct 22, 2020
jaraco added a commit that referenced this issue Jan 10, 2021
* Use `extend-ignore` in flake8 config

This option allows to add extra ignored rules to the default list
instead of replacing it.

The default exclusions are: E121, E123, E126, E226, E24, E704,
W503 and W504.

Fixes #28.

Refs:
* https://github.com/pypa/setuptools/pull/2486/files#r541943356
* https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-extend-ignore
*
https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-ignore

* Enable complexity limit. Fixes jaraco/skeleton#34.

* Replace pep517.build with build (#37)

* Replace pep517.build with build

Resolves #30

* Prefer simple usage

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

* Use license_files instead of license_file in meta (#35)

Singular `license_file` is deprecated since wheel v0.32.0.

Refs:
* https://wheel.readthedocs.io/en/stable/news.html
* https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
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

No branches or pull requests

1 participant