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

Python tests require setuptools module #628

Open
dmitry-lipetsk opened this issue Jul 24, 2024 · 0 comments
Open

Python tests require setuptools module #628

dmitry-lipetsk opened this issue Jul 24, 2024 · 0 comments

Comments

@dmitry-lipetsk
Copy link

Hello,

When I run probackup tests, I get the the following error - ModuleNotFoundError: No module named 'distutils'

(env) dima@ubuntu-work:~/.MY/GitHUB2/PostgresPro/pg_probackup/work2$ python -m unittest tests
/home/dima/.MY/GitHUB2/PostgresPro/pg_probackup/work2/tests/merge_test.py:1953: SyntaxWarning: invalid escape sequence '\ '
  """
E
======================================================================
ERROR: tests (unittest.loader._FailedTest.tests)
----------------------------------------------------------------------
ImportError: Failed to import test module: tests
Traceback (most recent call last):
  File "/usr/lib/python3.12/unittest/loader.py", line 137, in loadTestsFromName
    module = __import__(module_name)
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dima/.MY/GitHUB2/PostgresPro/pg_probackup/work2/tests/__init__.py", line 4, in <module>
    from . import init_test, merge_test, option_test, show_test, compatibility_test, \
  File "/home/dima/.MY/GitHUB2/PostgresPro/pg_probackup/work2/tests/backup_test.py", line 7, in <module>
    from distutils.dir_util import copy_tree
ModuleNotFoundError: No module named 'distutils'

----------------------------------------------------------------------
Ran 1 test in 0.000s

FAILED (errors=1)

This problem can be fixed with adding "setuptools" in tests/requirements.txt file.

dmitry-lipetsk added a commit to dmitry-lipetsk/pg_probackup that referenced this issue Jul 24, 2024
It is a fix for python tests execution error:
 ModuleNotFoundError: No module named 'distutils'
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