Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixed test-requirements.txt#1449

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 1 commit intogitpython-developers:mainfromwhokilleddb:fix_tests
May 28, 2022

Conversation

whokilleddb
Copy link
Contributor

Description

FixedModuleNotFoundError during running tests

Before Changes

$ pytestTest session starts (platform: linux, Python 3.6.9, pytest 7.0.1, pytest-sugar 0.9.4)rootdir: /root/GitPython, configfile: pyproject.toml, testpaths:testplugins: sugar-0.9.4, cov-3.0.0collecting ... ―――――――――――――――――――――――――――― ERROR collecting test/test_actor.py ―――――――――――――――――――――――――――――ImportErrorwhile importingtest module'/root/GitPython/test/test_actor.py'.Hint: make sure yourtest modules/packages have valid Python names.Traceback:env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)test/test_actor.py:7:in<module>    from test.lib import TestBasetest/lib/__init__.py:9:in<module>    from .helper import*test/lib/helper.py:17:in<module>    from git.compat import is_wingit/__init__.py:8:in<module>    from git.exc import*# @NoMove @IgnorePep8git/exc.py:8:in<module>    from gitdb.exc import BadName# NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614E   ModuleNotFoundError: No module named'gitdb'――――――――――――――――――――――――――――― ERROR collecting test/test_base.py ―――――――――――――――――――――――――――――ImportErrorwhile importingtest module'/root/GitPython/test/test_base.py'.Hint: make sure yourtest modules/packages have valid Python names.Traceback:env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)test/test_base.py:12:in<module>    from git.objects import Blob, Tree, Commit, TagObjectgit/__init__.py:8:in<module>    from git.exc import*# @NoMove @IgnorePep8git/exc.py:8:in<module>    from gitdb.exc import BadName# NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614E   ModuleNotFoundError: No module named'gitdb'――――――――――――――――――――――――――――― ERROR collecting test/test_blob.py ―――――――――――――――――――――――――――――ImportErrorwhile importingtest module'/root/GitPython/test/test_blob.py'.Hint: make sure yourtest modules/packages have valid Python names.Traceback:env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)test/test_blob.py:7:in<module>    from test.lib import TestBasetest/lib/__init__.py:9:in<module>    from .helper import*test/lib/helper.py:17:in<module>    from git.compat import is_wingit/__init__.py:8:in<module>    from git.exc import*# @NoMove @IgnorePep8git/exc.py:8:in<module>    from gitdb.exc import BadName# NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614E   ModuleNotFoundError: No module named'gitdb'―――――――――――――――――――――――――――― ERROR collecting test/test_clone.py ―――――――――――――――――――――――――――――ImportErrorwhile importingtest module'/root/GitPython/test/test_clone.py'.Hint: make sure yourtest modules/packages have valid Python names.Traceback:env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)test/test_clone.py:8:in<module>    import gitgit/__init__.py:8:in<module>    from git.exc import*# @NoMove @IgnorePep8git/exc.py:8:in<module>    from gitdb.exc import BadName# NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614E   ModuleNotFoundError: No module named'gitdb'―――――――――――――――――――――――――――― ERROR collecting test/test_commit.py ――――――――――――――――――――――――――――ImportErrorwhile importingtest module'/root/GitPython/test/test_commit.py'.Hint: make sure yourtest modules/packages have valid Python names.Traceback:env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)test/test_commit.py:15:in<module>    from git import (git/__init__.py:8:in<module>    from git.exc import*# @NoMove @IgnorePep8git/exc.py:8:in<module>    from gitdb.exc import BadName# NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614E   ModuleNotFoundError: No module named'gitdb'―――――――――――――――――――――――――――― ERROR collecting test/test_config.py ――――――――――――――――――――――――――――ImportErrorwhile importingtest module'/root/GitPython/test/test_config.py'.Hint: make sure yourtest modules/packages have valid Python names.Traceback:env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)test/test_config.py:12:in<module>    from git import GitConfigParsergit/__init__.py:8:in<module>    from git.exc import*# @NoMove @IgnorePep8git/exc.py:8:in<module>    from gitdb.exc import BadName# NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614E   ModuleNotFoundError: No module named'gitdb'―――――――――――――――――――――――――――――― ERROR collecting test/test_db.py ――――――――――――――――――――――――――――――ImportErrorwhile importingtest module'/root/GitPython/test/test_db.py'.Hint: make sure yourtest modules/packages have valid Python names.Traceback:env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)test/test_db.py:6:in<module>    from git.db import GitCmdObjectDBgit/__init__.py:8:in<module>    from git.exc import*# @NoMove @IgnorePep8git/exc.py:8:in<module>    from gitdb.exc import BadName# NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614E   ModuleNotFoundError: No module named'gitdb'――――――――――――――――――――――――――――― ERROR collecting test/test_diff.py ―――――――――――――――――――――――――――――ImportErrorwhile importingtest module'/root/GitPython/test/test_diff.py'.Hint: make sure yourtest modules/packages have valid Python names.Traceback:env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)test/test_diff.py:11:in<module>    from git import (git/__init__.py:8:in<module>    from git.exc import*# @NoMove @IgnorePep8git/exc.py:8:in<module>    from gitdb.exc import BadName# NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614E   ModuleNotFoundError: No module named'gitdb'――――――――――――――――――――――――――――― ERROR collecting test/test_docs.py ―――――――――――――――――――――――――――――ImportErrorwhile importingtest module'/root/GitPython/test/test_docs.py'.Hint: make sure yourtest modules/packages have valid Python names.Traceback:env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)test/test_docs.py:9:in<module>    from test.lib import TestBasetest/lib/__init__.py:9:in<module>    from .helper import*test/lib/helper.py:17:in<module>    from git.compat import is_wingit/__init__.py:8:in<module>    from git.exc import*# @NoMove @IgnorePep8git/exc.py:8:in<module>    from gitdb.exc import BadName# NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614E   ModuleNotFoundError: No module named'gitdb'――――――――――――――――――――――――――――― ERROR collecting test/test_exc.py ――――――――――――――――――――――――――――――ImportErrorwhile importingtest module'/root/GitPython/test/test_exc.py'.Hint: make sure yourtest modules/packages have valid Python names.Traceback:env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)test/test_exc.py:12:in<module>    from git.exc import (git/__init__.py:8:in<module>    from git.exc import*# @NoMove @IgnorePep8git/exc.py:8:in<module>    from gitdb.exc import BadName# NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614E   ModuleNotFoundError: No module named'gitdb'================================== shorttest summary info ===================================FAILED test/test_actor.pyFAILED test/test_base.pyFAILED test/test_blob.pyFAILED test/test_clone.pyFAILED test/test_commit.pyFAILED test/test_config.pyFAILED test/test_db.pyFAILED test/test_diff.pyFAILED test/test_docs.pyFAILED test/test_exc.py!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 10 failures!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

After Changes

$ pytestTest session starts (platform: linux, Python 3.6.9, pytest 7.0.1, pytest-sugar 0.9.4)rootdir: /root/GitPython, configfile: pyproject.toml, testpaths:testplugins: sugar-0.9.4, cov-3.0.0collecting ... ―――――――――――――――――――――――――――― ERROR collecting test/test_actor.py ―――――――――――――――――――――――――――――env/lib/python3.6/site-packages/_pytest/python.py:599:in _importtestmodule    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)env/lib/python3.6/site-packages/_pytest/pathlib.py:533:in import_path    importlib.import_module(module_name)env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)<frozen importlib._bootstrap>:994:in _gcd_import???<frozen importlib._bootstrap>:971:in _find_and_load???<frozen importlib._bootstrap>:955:in _find_and_load_unlocked???<frozen importlib._bootstrap>:665:in _load_unlocked???env/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:171:in exec_module    exec(co, module.__dict__)test/test_actor.py:7:in<module>    from test.lib import TestBasetest/lib/__init__.py:9:in<module>    from .helper import*test/lib/helper.py:17:in<module>    from git.compat import is_wingit/__init__.py:44:in<module>    from git.objects import*# @NoMove @IgnorePep8git/objects/__init__.py:9:in<module>    from .commit import*git/objects/commit.py:10:in<module>    from git.diff import Diffablegit/diff.py:8:in<module>    from git.cmd import handle_process_outputE     File"/root/GitPython/git/cmd.py", line 6E       from __future__ import annotationsE                                        ^E   SyntaxError: future feature annotations is not defined――――――――――――――――――――――――――――― ERROR collecting test/test_base.py ―――――――――――――――――――――――――――――env/lib/python3.6/site-packages/_pytest/python.py:599:in _importtestmodule    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)env/lib/python3.6/site-packages/_pytest/pathlib.py:533:in import_path    importlib.import_module(module_name)env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)<frozen importlib._bootstrap>:994:in _gcd_import???<frozen importlib._bootstrap>:971:in _find_and_load???<frozen importlib._bootstrap>:955:in _find_and_load_unlocked???<frozen importlib._bootstrap>:665:in _load_unlocked???env/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:171:in exec_module    exec(co, module.__dict__)test/test_base.py:12:in<module>    from git.objects import Blob, Tree, Commit, TagObjectgit/__init__.py:44:in<module>    from git.objects import*# @NoMove @IgnorePep8git/objects/__init__.py:9:in<module>    from .commit import*git/objects/commit.py:10:in<module>    from git.diff import Diffablegit/diff.py:8:in<module>    from git.cmd import handle_process_outputE     File"/root/GitPython/git/cmd.py", line 6E       from __future__ import annotationsE                                        ^E   SyntaxError: future feature annotations is not defined――――――――――――――――――――――――――――― ERROR collecting test/test_blob.py ―――――――――――――――――――――――――――――env/lib/python3.6/site-packages/_pytest/python.py:599:in _importtestmodule    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)env/lib/python3.6/site-packages/_pytest/pathlib.py:533:in import_path    importlib.import_module(module_name)env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)<frozen importlib._bootstrap>:994:in _gcd_import???<frozen importlib._bootstrap>:971:in _find_and_load???<frozen importlib._bootstrap>:955:in _find_and_load_unlocked???<frozen importlib._bootstrap>:665:in _load_unlocked???env/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:171:in exec_module    exec(co, module.__dict__)test/test_blob.py:8:in<module>    from git import Blobgit/__init__.py:44:in<module>    from git.objects import*# @NoMove @IgnorePep8git/objects/__init__.py:9:in<module>    from .commit import*git/objects/commit.py:10:in<module>    from git.diff import Diffablegit/diff.py:8:in<module>    from git.cmd import handle_process_outputE     File"/root/GitPython/git/cmd.py", line 6E       from __future__ import annotationsE                                        ^E   SyntaxError: future feature annotations is not defined―――――――――――――――――――――――――――― ERROR collecting test/test_clone.py ―――――――――――――――――――――――――――――env/lib/python3.6/site-packages/_pytest/python.py:599:in _importtestmodule    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)env/lib/python3.6/site-packages/_pytest/pathlib.py:533:in import_path    importlib.import_module(module_name)env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)<frozen importlib._bootstrap>:994:in _gcd_import???<frozen importlib._bootstrap>:971:in _find_and_load???<frozen importlib._bootstrap>:955:in _find_and_load_unlocked???<frozen importlib._bootstrap>:665:in _load_unlocked???env/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:171:in exec_module    exec(co, module.__dict__)test/test_clone.py:8:in<module>    import gitgit/__init__.py:44:in<module>    from git.objects import*# @NoMove @IgnorePep8git/objects/__init__.py:9:in<module>    from .commit import*git/objects/commit.py:10:in<module>    from git.diff import Diffablegit/diff.py:8:in<module>    from git.cmd import handle_process_outputE     File"/root/GitPython/git/cmd.py", line 6E       from __future__ import annotationsE                                        ^E   SyntaxError: future feature annotations is not defined―――――――――――――――――――――――――――― ERROR collecting test/test_commit.py ――――――――――――――――――――――――――――env/lib/python3.6/site-packages/_pytest/python.py:599:in _importtestmodule    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)env/lib/python3.6/site-packages/_pytest/pathlib.py:533:in import_path    importlib.import_module(module_name)env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)<frozen importlib._bootstrap>:994:in _gcd_import???<frozen importlib._bootstrap>:971:in _find_and_load???<frozen importlib._bootstrap>:955:in _find_and_load_unlocked???<frozen importlib._bootstrap>:665:in _load_unlocked???env/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:171:in exec_module    exec(co, module.__dict__)test/test_commit.py:15:in<module>    from git import (git/__init__.py:44:in<module>    from git.objects import*# @NoMove @IgnorePep8git/objects/__init__.py:9:in<module>    from .commit import*git/objects/commit.py:10:in<module>    from git.diff import Diffablegit/diff.py:8:in<module>    from git.cmd import handle_process_outputE     File"/root/GitPython/git/cmd.py", line 6E       from __future__ import annotationsE                                        ^E   SyntaxError: future feature annotations is not defined―――――――――――――――――――――――――――― ERROR collecting test/test_config.py ――――――――――――――――――――――――――――env/lib/python3.6/site-packages/_pytest/python.py:599:in _importtestmodule    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)env/lib/python3.6/site-packages/_pytest/pathlib.py:533:in import_path    importlib.import_module(module_name)env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)<frozen importlib._bootstrap>:994:in _gcd_import???<frozen importlib._bootstrap>:971:in _find_and_load???<frozen importlib._bootstrap>:955:in _find_and_load_unlocked???<frozen importlib._bootstrap>:665:in _load_unlocked???env/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:171:in exec_module    exec(co, module.__dict__)test/test_config.py:12:in<module>    from git import GitConfigParsergit/__init__.py:44:in<module>    from git.objects import*# @NoMove @IgnorePep8git/objects/__init__.py:9:in<module>    from .commit import*git/objects/commit.py:10:in<module>    from git.diff import Diffablegit/diff.py:8:in<module>    from git.cmd import handle_process_outputE     File"/root/GitPython/git/cmd.py", line 6E       from __future__ import annotationsE                                        ^E   SyntaxError: future feature annotations is not defined―――――――――――――――――――――――――――――― ERROR collecting test/test_db.py ――――――――――――――――――――――――――――――env/lib/python3.6/site-packages/_pytest/python.py:599:in _importtestmodule    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)env/lib/python3.6/site-packages/_pytest/pathlib.py:533:in import_path    importlib.import_module(module_name)env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)<frozen importlib._bootstrap>:994:in _gcd_import???<frozen importlib._bootstrap>:971:in _find_and_load???<frozen importlib._bootstrap>:955:in _find_and_load_unlocked???<frozen importlib._bootstrap>:665:in _load_unlocked???env/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:171:in exec_module    exec(co, module.__dict__)test/test_db.py:6:in<module>    from git.db import GitCmdObjectDBgit/__init__.py:44:in<module>    from git.objects import*# @NoMove @IgnorePep8git/objects/__init__.py:9:in<module>    from .commit import*git/objects/commit.py:10:in<module>    from git.diff import Diffablegit/diff.py:8:in<module>    from git.cmd import handle_process_outputE     File"/root/GitPython/git/cmd.py", line 6E       from __future__ import annotationsE                                        ^E   SyntaxError: future feature annotations is not defined――――――――――――――――――――――――――――― ERROR collecting test/test_diff.py ―――――――――――――――――――――――――――――env/lib/python3.6/site-packages/_pytest/python.py:599:in _importtestmodule    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)env/lib/python3.6/site-packages/_pytest/pathlib.py:533:in import_path    importlib.import_module(module_name)env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)<frozen importlib._bootstrap>:994:in _gcd_import???<frozen importlib._bootstrap>:971:in _find_and_load???<frozen importlib._bootstrap>:955:in _find_and_load_unlocked???<frozen importlib._bootstrap>:665:in _load_unlocked???env/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:171:in exec_module    exec(co, module.__dict__)test/test_diff.py:11:in<module>    from git import (git/__init__.py:44:in<module>    from git.objects import*# @NoMove @IgnorePep8git/objects/__init__.py:9:in<module>    from .commit import*git/objects/commit.py:10:in<module>    from git.diff import Diffablegit/diff.py:8:in<module>    from git.cmd import handle_process_outputE     File"/root/GitPython/git/cmd.py", line 6E       from __future__ import annotationsE                                        ^E   SyntaxError: future feature annotations is not defined――――――――――――――――――――――――――――― ERROR collecting test/test_fun.py ――――――――――――――――――――――――――――――env/lib/python3.6/site-packages/_pytest/python.py:599:in _importtestmodule    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)env/lib/python3.6/site-packages/_pytest/pathlib.py:533:in import_path    importlib.import_module(module_name)env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)<frozen importlib._bootstrap>:994:in _gcd_import???<frozen importlib._bootstrap>:971:in _find_and_load???<frozen importlib._bootstrap>:955:in _find_and_load_unlocked???<frozen importlib._bootstrap>:665:in _load_unlocked???env/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:171:in exec_module    exec(co, module.__dict__)test/test_fun.py:7:in<module>    from git import Gitgit/__init__.py:44:in<module>    from git.objects import*# @NoMove @IgnorePep8git/objects/__init__.py:9:in<module>    from .commit import*git/objects/commit.py:10:in<module>    from git.diff import Diffablegit/diff.py:8:in<module>    from git.cmd import handle_process_outputE     File"/root/GitPython/git/cmd.py", line 6E       from __future__ import annotationsE                                        ^E   SyntaxError: future feature annotations is not defined――――――――――――――――――――――――――――― ERROR collecting test/test_git.py ――――――――――――――――――――――――――――――env/lib/python3.6/site-packages/_pytest/python.py:599:in _importtestmodule    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)env/lib/python3.6/site-packages/_pytest/pathlib.py:533:in import_path    importlib.import_module(module_name)env/lib/python3.6/importlib/__init__.py:126:in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)<frozen importlib._bootstrap>:994:in _gcd_import???<frozen importlib._bootstrap>:971:in _find_and_load???<frozen importlib._bootstrap>:955:in _find_and_load_unlocked???<frozen importlib._bootstrap>:665:in _load_unlocked???env/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:171:in exec_module    exec(co, module.__dict__)test/test_git.py:13:in<module>    from git import Git, refresh, GitCommandError, GitCommandNotFound, Repo, cmdgit/__init__.py:44:in<module>    from git.objects import*# @NoMove @IgnorePep8git/objects/__init__.py:9:in<module>    from .commit import*git/objects/commit.py:10:in<module>    from git.diff import Diffablegit/diff.py:8:in<module>    from git.cmd import handle_process_outputE     File"/root/GitPython/git/cmd.py", line 6E       from __future__ import annotationsE                                        ^E   SyntaxError: future feature annotations is not defined================================== shorttest summary info ===================================FAILED test/test_actor.pyFAILED test/test_base.pyFAILED test/test_blob.pyFAILED test/test_clone.pyFAILED test/test_commit.pyFAILED test/test_config.pyFAILED test/test_db.pyFAILED test/test_diff.pyFAILED test/test_fun.pyFAILED test/test_git.py!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 10 failures!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

@Byron
Copy link
Member

Thanks a lot! Great catch.

@ByronByron merged commit14a5b39 intogitpython-developers:mainMay 28, 2022
@whokilleddbwhokilleddb deleted the fix_tests branchMay 28, 2022 06:48
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@whokilleddb@Byron

[8]ページ先頭

©2009-2025 Movatter.jp