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

tests/unit/discovery/py_info/test_py_info.py::test_py_info_to_system_raises fails on openSUSE #1882

Closed
scarabeusiv opened this issue Jul 3, 2020 · 5 comments · Fixed by #1888

Comments

@scarabeusiv
Copy link

As per $SUMMARY the test is failing in assertion on openSUSE:

[   35s] >       assert result is None
[   35s] E       AssertionError: assert PythonInfo({'platform': 'linux', 'implementation': 'CPython', 'version_info': VersionInfo(major=3, minor=8, micro=3, r...em_stdlib': '/usr/lib64/python3.8', 'system_stdlib_platform': '/usr/lib64/python3.8', 'max_size': 9223372036854775807}) is None
[   35s] ________________________ test_py_info_to_system_raises _________________________
[   35s] 
[   35s] session_app_data = /tmp/pytest-of-abuild/pytest-2/session-app-data0
[   35s] mocker = <pytest_mock.plugin.MockFixture object at 0x7f5a7a0e9970>
[   35s] caplog = <_pytest.logging.LogCaptureFixture object at 0x7f5a7a0e9a90>
[   35s] 
[   35s]     def test_py_info_to_system_raises(session_app_data, mocker, caplog):
[   35s]         caplog.set_level(logging.DEBUG)
[   35s]         mocker.patch.object(PythonInfo, "_find_possible_folders", return_value=[])
[   35s]         result = PythonInfo.from_exe(sys.executable, app_data=session_app_data, raise_on_error=False)
[   35s] >       assert result is None
[   35s] E       AssertionError: assert PythonInfo({'platform': 'linux', 'implementation': 'CPython', 'version_info': VersionInfo(major=3, minor=8, micro=3, r...em_stdlib': '/usr/lib64/python3.8', 'system_stdlib_platform': '/usr/lib64/python3.8', 'max_size': 9223372036854775807}) is None
[   35s] 
[   35s] caplog     = <_pytest.logging.LogCaptureFixture object at 0x7f5a7a0e9a90>
[   35s] mocker     = <pytest_mock.plugin.MockFixture object at 0x7f5a7a0e9970>
[   35s] result     = PythonInfo({'platform': 'linux', 'implementation': 'CPython', 'version_info': VersionInfo(major=3, minor=8, micro=3, r...em_stdlib': '/usr/lib64/python3.8', 'system_stdlib_platform': '/usr/lib64/python3.8', 'max_size': 9223372036854775807})
[   35s] session_app_data = /tmp/pytest-of-abuild/pytest-2/session-app-data0
[   35s] 
[   35s] tests/unit/discovery/py_info/test_py_info.py:306: AssertionError
[   35s] ------------------------------ Captured log call -------------------------------
[   35s] DEBUG    root:cached_py_info.py:87 get interpreter info via cmd: /usr/bin/python3 /usr/lib/python3.8/site-packages/virtualenv/discovery/py_info.py
[   35s] DEBUG    root:via_disk_folder.py:159 wrote python info of /usr/bin/python3 at /tmp/pytest-of-abuild/pytest-2/session-app-data0/py_info/1/31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6.json

@scarabeusiv scarabeusiv added the bug label Jul 3, 2020
@gaborbernat
Copy link
Contributor

Can you please detail how did you set up the test environment? Thanks!

@gaborbernat
Copy link
Contributor

gaborbernat commented Jul 4, 2020

Something like:

FROM opensuse/tumbleweed:latest

RUN zypper install -y python3-pip sqlite3-devel

ENV SETUPTOOLS_SCM_PRETEND_VERSION 20.0.25

COPY . /w
WORKDIR /w

RUN python3.8 -m pip install .[testing]
RUN python3.8 -m pytest /w

@scarabeusiv
Copy link
Author

RPM creation for the distribution itself:
https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv

Full build log with package versions used:
virtualenv-buildlog.txt

@gaborbernat
Copy link
Contributor

Sorry I don't have access to that build system. Can you create a docker image to replicate the issue?

@gaborbernat
Copy link
Contributor

Managed to reproduce with:

FROM opensuse/tumbleweed:latest

RUN zypper install -y python3 python3-pip

ENV SETUPTOOLS_SCM_PRETEND_VERSION 20.0.25

COPY . /opt/project
WORKDIR /opt/project

RUN python3.8 -m pip install /opt/project[testing]
RUN python3.8 -m pytest /opt/project -k test_py_info_to_system_raises

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants