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

isort 5.0.4 package includes tests directory #1285

Closed
richvdh opened this issue Jul 6, 2020 · 2 comments
Closed

isort 5.0.4 package includes tests directory #1285

richvdh opened this issue Jul 6, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@richvdh
Copy link

richvdh commented Jul 6, 2020

The isort 5.0.4 package on pypi (https://files.pythonhosted.org/packages/24/ab/670fa465f823b3eff28a4e2d8522fd78dae60704ae863602554b8b01972c/isort-5.0.4.tar.gz) includes a tests package. That interferes with any local tests package, leading to problems like this:

$ pip install isort==5.0.4
Collecting isort==5.0.4
  Using cached isort-5.0.4-py3-none-any.whl (153 kB)
Installing collected packages: isort
  Attempting uninstall: isort
    Found existing installation: isort 5.0.3
    Uninstalling isort-5.0.3:
      Successfully uninstalled isort-5.0.3
Successfully installed isort-5.0.4

$ trial tests
tests
  test_comments ...                                                     [ERROR]
  test_format ...                                                       [ERROR]
  test_main ...                                                         [ERROR]
  test_output ...                                                       [ERROR]
  test_parse ...                                                        [ERROR]
  test_pylama_isort ...                                                 [ERROR]
  test_wrap_modes ...                                                   [ERROR]

===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/home/rav/work/synapse/env3/lib/python3.6/site-packages/twisted/trial/runner.py", line 531, in loadPackage
    module = modinfo.load()
  File "/home/rav/work/synapse/env3/lib/python3.6/site-packages/twisted/python/modules.py", line 392, in load
    return self.pathEntry.pythonPath.moduleLoader(self.name)
  File "/home/rav/work/synapse/env3/lib/python3.6/site-packages/twisted/python/reflect.py", line 308, in namedAny
    topLevelPackage = _importAndCheckStack(trialname)
  File "/home/rav/work/synapse/env3/lib/python3.6/site-packages/twisted/python/reflect.py", line 255, in _importAndCheckStack
    reraise(excValue, excTraceback)
  File "/home/rav/work/synapse/env3/lib/python3.6/site-packages/tests/test_comments.py", line 1, in <module>
    from hypothesis_auto import auto_pytest_magic
builtins.ModuleNotFoundError: No module named 'hypothesis_auto'

isort 5.0.3 did not have this problem.

@anoadragon453
Copy link

Likely related: bae1221

@timothycrosley
Copy link
Member

Thank you for reporting!
I'm sorry this issue affected you! A fix has been released with version 5.0.5 of isort.

Thanks!

~Timothy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants