Skip to content

isort 5.0.4 package includes tests directory #1285

@richvdh

Description

@richvdh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions