Bug 1687384 - pytest FTBFS (not only with Python 3.8)
Summary: pytest FTBFS (not only with Python 3.8)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pytest
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: PYTEST4
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-03-11 12:29 UTC by Miro Hrončok
Modified: 2019-04-09 10:58 UTC (History)
2 users (show)

Fixed In Version: pytest-4.3.1-1.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-09 10:58:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
build.log from copr (48.05 KB, text/plain)
2019-03-11 12:32 UTC, Miro Hrončok
no flags Details
root.log from copr (40.34 KB, text/plain)
2019-03-11 12:33 UTC, Miro Hrončok
no flags Details
build.log from copr, Python 3.8 tests first (114.80 KB, text/plain)
2019-03-11 15:01 UTC, Miro Hrončok
no flags Details

Description Miro Hrončok 2019-03-11 12:29:42 UTC
pytest-3.9.3-3.fc31 FTBFS, Python 2 tests give:

    import unittest.mock as mock
E   ImportError: No module named mock

That is kinda expected as this was added in Python 3. Yet it used to work.



+ /builddir/build/BUILDROOT/pytest-3.9.3-3.fc31.x86_64/usr/bin/pytest-2.7 -r s testing
============================= test session starts ==============================
platform linux2 -- Python 2.7.16, pytest-3.9.3, py-1.7.0, pluggy-0.8.1
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/builddir/build/BUILD/pytest-3.9.3/.hypothesis/examples')
rootdir: /builddir/build/BUILD/pytest-3.9.3, inifile: tox.ini
plugins: hypothesis-4.9.0
collected 2185 items / 2 errors
==================================== ERRORS ====================================
____________________ ERROR collecting testing/test_mark.py _____________________
ImportError while importing test module '/builddir/build/BUILD/pytest-3.9.3/testing/test_mark.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python2.7/site-packages/six.py:709: in exec_
    exec("""exec _code_ in _globs_, _locs_""")
testing/test_mark.py:11: in <module>
    import unittest.mock as mock
E   ImportError: No module named mock
__________________ ERROR collecting testing/code/test_code.py __________________
ImportError while importing test module '/builddir/build/BUILD/pytest-3.9.3/testing/code/test_code.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python2.7/site-packages/six.py:709: in exec_
    exec("""exec _code_ in _globs_, _locs_""")
testing/code/test_code.py:17: in <module>
    import unittest.mock as mock
E   ImportError: No module named mock
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 2 error in 4.99 seconds ============================



https://apps.fedoraproject.org/koschei/package/pytest

I suspect the update to python2-six 1.11.0-7.fc30.

Fresh scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=33397478 seems to get past the failure, will investigate.

Comment 1 Miro Hrončok 2019-03-11 12:30:09 UTC
BTW I need pytest to build to bootstrap Python 3.8.

Comment 2 Miro Hrončok 2019-03-11 12:32:45 UTC
Created attachment 1542862 [details]
build.log from copr

Comment 3 Miro Hrončok 2019-03-11 12:33:07 UTC
Created attachment 1542863 [details]
root.log from copr

Comment 4 Miro Hrončok 2019-03-11 14:45:19 UTC
Note:

In rawhide, there is a separate test failure with Python 3.7.

In copr with Python 3.8, the python2 tests fail to run.

Comment 5 Miro Hrončok 2019-03-11 15:00:33 UTC
More importantly, there are 5 failed tests on Python 3.8. I think we need to bump pytest to 4.x

https://github.com/pytest-dev/pytest/commit/0c5e717f43151852efb08ac72b0f0691443ab352

Will attach build.log.

Comment 6 Miro Hrončok 2019-03-11 15:01:44 UTC
Created attachment 1542917 [details]
build.log from copr, Python 3.8 tests first

Comment 7 Miro Hrončok 2019-03-12 14:40:17 UTC
I've solved the Python 2 failure: mock is no longer an optional test dependency on Python 2.

Comment 8 Miro Hrončok 2019-03-12 15:04:57 UTC
Another failure: https://github.com/pytest-dev/pytest/issues/4913

Comment 9 Miro Hrončok 2019-03-12 15:42:09 UTC
Another (already fixed) failure: https://github.com/pytest-dev/pytest/issues/4716


Note You need to log in before you can comment on or make changes to this bug.