Activity log for bug #1733584

Date Who What changed Old value New value Message
2017-11-21 12:42:42 Sergio Schvezov bug added bug
2017-11-21 20:17:04 Sergio Schvezov description snapcraft/tests/unit/plugins/python/_basesuite.py:21: error: Name 'snapcraft.tests.unit.TestCase' is not defined snapcraft/tests/unit/plugins/test_jhbuild.py:21: error: Name 'snapcraft.tests.unit.TestCase' is not defined snapcraft/tests/unit/sources/test_subversion.py:28: error: Name 'unit.sources.SourceTestCase' is not defined snapcraft/tests/unit/sources/test_mercurial.py:31: error: Name 'unit.sources.SourceTestCase' is not defined snapcraft/tests/unit/sources/test_git.py:32: error: Name 'unit.sources.SourceTestCase' is not defined snapcraft/tests/unit/sources/test_bazaar.py:29: error: Name 'unit.sources.SourceTestCase' is not defined __init__.py should be used for imports only (common convention) and we should research getting rid of it all together by looking at https://www.python.org/dev/peps/pep-0420/ snapcraft/tests/unit/plugins/python/_basesuite.py:21: error: Name 'snapcraft.tests.unit.TestCase' is not defined snapcraft/tests/unit/plugins/test_jhbuild.py:21: error: Name 'snapcraft.tests.unit.TestCase' is not defined snapcraft/tests/unit/sources/test_subversion.py:28: error: Name 'unit.sources.SourceTestCase' is not defined snapcraft/tests/unit/sources/test_mercurial.py:31: error: Name 'unit.sources.SourceTestCase' is not defined snapcraft/tests/unit/sources/test_git.py:32: error: Name 'unit.sources.SourceTestCase' is not defined snapcraft/tests/unit/sources/test_bazaar.py:29: error: Name 'unit.sources.SourceTestCase' is not defined __init__.py should be used for imports only (common convention) and we should research getting rid of it all together by looking at https://www.python.org/dev/peps/pep-0420/ Answer in one of our code reviews: """ There are a bunch of issues in mypy related to using __init__.py, one of them is that for this to work you would need to import snapcraft.tests.unit.__init__ or something like that since it sort of works at the module level and not really at a package level. This is somewhat not urgent as it is discouraged to implement things in __init__.py in the python world. """