pytest-dev / py

Python development support library (note: maintenance only)
MIT License
67 stars 106 forks source link

Test `py37-pytest29` failed #192

Closed yan12125 closed 6 years ago

yan12125 commented 6 years ago

I'd like to check if py works with Python 3.7, so I add py37 to tox.ini. py36-pytest29, py36-pytest30 and py37-pytest30 passed while py37-pytest29 failed:

GLOB sdist-make: /Users/yen/Projects/py/setup.py
py37-pytest29 create: /Users/yen/Projects/py/.tox/py37-pytest29
py37-pytest29 installdeps: attrs, pytest~=2.9.0
py37-pytest29 inst: /Users/yen/Projects/py/.tox/dist/py-1.5.5.dev7+gb7ff2e92.d20180706.zip
py37-pytest29 installed: attrs==18.1.0,py==1.5.5.dev7+gb7ff2e92.d20180706,pytest==2.9.2
py37-pytest29 runtests: PYTHONHASHSEED='2770225342'
py37-pytest29 runtests: commands[0] | pip install -U ..
Processing /Users/yen/Projects/py
Building wheels for collected packages: py
  Running setup.py bdist_wheel for py ... done
  Stored in directory: /private/var/folders/kp/0pvpzpj52sx5q46yms1bxwwm0000gn/T/pip-ephem-wheel-cache-62n7bgu5/wheels/67/b3/b5/3ac708ad2891824ad17b022126a84fd9064df12418fdbb4e87
Successfully built py
Installing collected packages: py
  Found existing installation: py 1.5.5.dev7+gb7ff2e92.d20180706
    Uninstalling py-1.5.5.dev7+gb7ff2e92.d20180706:
      Successfully uninstalled py-1.5.5.dev7+gb7ff2e92.d20180706
Successfully installed py-1.5.5.dev7+gb7ff2e92.d20180706
py37-pytest29 runtests: commands[1] | py.test --confcutdir=.. -rfsxX --junitxml=/Users/yen/Projects/py/.tox/py37-pytest29/log/junit-py37-pytest29.xml
===================================================== test session starts ======================================================
platform darwin -- Python 3.7.0, pytest-2.9.2, py-1.5.5.dev7+gb7ff2e92.d20180706, pluggy-0.3.1
rootdir: /Users/yen/Projects/py, inifile: tox.ini
collected 839 items / 1 errors

code/test_assertion.py ...............ss.......
code/test_code.py ..............
code/test_excinfo.py ...........s........s....................................................
code/test_source.py .....................................................................
io_/test_capture.py ..................s.............s.............s................s.....................
io_/test_saferepr.py ........
io_/test_terminalwriter.py .............................................
log/test_log.py .................
log/test_warning.py x.....
path/test_cacheutil.py .............
path/test_local.py ..............................s..................................ss...............................x......s...............................sssssss............................x...
path/test_svnauth.py ........................sssssssssss
path/test_svnurl.py .............................s................................ss....x...............
path/test_svnwc.py ...............................s..................................ss..........x.................................
process/test_cmdexec.py .....
process/test_forkedfunc.py ..............
process/test_killproc.py .
root/test_builtin.py ...................
root/test_py_imports.py .................
root/test_std.py ...
root/test_xmlgen.py ...................

------------------ generated xml file: /Users/yen/Projects/py/.tox/py37-pytest29/log/junit-py37-pytest29.xml -------------------
=================================================== short test summary info ====================================================
SKIP [2] /Users/yen/Projects/py/testing/code/test_assertion.py:167: could not import 'py._code._assertionold'
SKIP [1] /Users/yen/Projects/py/testing/code/test_excinfo.py:203: could not import 'decorator'
SKIP [1] /Users/yen/Projects/py/testing/code/test_excinfo.py:315: could not import 'jinja2'
SKIP [4] testing/io_/test_capture.py:236: text output different for bytes on python3
SKIP [3] testing/path/common.py:190: sys.version_info < (3,6)
SKIP [3] testing/path/common.py:446: sys.version_info < (3,6)
SKIP [3] testing/path/common.py:451: sys.version_info < (3,6)
SKIP [1] testing/path/test_local.py:366: condition: not (sys.platform == 'win32' or getattr(os, '_name', None) == 'nt')
SKIP [1] testing/path/test_local.py:641: condition: not (sys.platform == 'win32' or getattr(os, '_name', None) == 'nt')
SKIP [1] testing/path/test_local.py:645: condition: not (sys.platform == 'win32' or getattr(os, '_name', None) == 'nt')
SKIP [1] testing/path/test_local.py:658: condition: not (sys.platform == 'win32' or getattr(os, '_name', None) == 'nt')
SKIP [1] testing/path/test_local.py:664: condition: not (sys.platform == 'win32' or getattr(os, '_name', None) == 'nt')
SKIP [1] testing/path/test_local.py:669: condition: not (sys.platform == 'win32' or getattr(os, '_name', None) == 'nt')
SKIP [1] testing/path/test_local.py:677: condition: not (sys.platform == 'win32' or getattr(os, '_name', None) == 'nt')
SKIP [1] testing/path/test_local.py:684: condition: not (sys.platform == 'win32' or getattr(os, '_name', None) == 'nt')
SKIP [11] /Users/yen/Projects/py/testing/path/test_svnauth.py:272: use --runslowtests to run these tests
XFAIL log/test_warning.py::test_forwarding_to_warnings_module
XFAIL path/test_local.py::TestLocalPath::()::test_long_filenames
  reason: [NOTRUN] unreliable est for long filenames
XFAIL path/test_local.py::TestUnicodePy2Py3::()::test_read_write
  changing read/write might break existing usages
XFAIL path/test_svnurl.py::TestSvnURLCommandPath::()::test_load
XFAIL path/test_svnwc.py::TestWCSvnCommandPath::()::test_status_update
  reason: svn-1.7 has buggy 'status --xml' output
============================================================ ERRORS ============================================================
_________________________________________ ERROR collecting testing/root/test_error.py __________________________________________
../.tox/py37-pytest29/lib/python3.7/site-packages/_pytest/runner.py:150: in __init__
    self.result = func()
../.tox/py37-pytest29/lib/python3.7/site-packages/_pytest/main.py:435: in _memocollect
    return self._memoizedcall('_collected', lambda: list(self.collect()))
../.tox/py37-pytest29/lib/python3.7/site-packages/_pytest/main.py:315: in _memoizedcall
    res = function()
../.tox/py37-pytest29/lib/python3.7/site-packages/_pytest/main.py:435: in <lambda>
    return self._memoizedcall('_collected', lambda: list(self.collect()))
../.tox/py37-pytest29/lib/python3.7/site-packages/_pytest/python.py:605: in collect
    return super(Module, self).collect()
../.tox/py37-pytest29/lib/python3.7/site-packages/_pytest/python.py:459: in collect
    res = self.makeitem(name, obj)
../.tox/py37-pytest29/lib/python3.7/site-packages/_pytest/python.py:471: in makeitem
    collector=self, name=name, obj=obj)
../.tox/py37-pytest29/lib/python3.7/site-packages/_pytest/vendored_packages/pluggy.py:724: in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
../.tox/py37-pytest29/lib/python3.7/site-packages/_pytest/vendored_packages/pluggy.py:338: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
../.tox/py37-pytest29/lib/python3.7/site-packages/_pytest/vendored_packages/pluggy.py:333: in <lambda>
    _MultiCall(methods, kwargs, hook.spec_opts).execute()
../.tox/py37-pytest29/lib/python3.7/site-packages/_pytest/vendored_packages/pluggy.py:595: in execute
    return _wrapped_call(hook_impl.function(*args), self.execute)
../.tox/py37-pytest29/lib/python3.7/site-packages/_pytest/vendored_packages/pluggy.py:249: in _wrapped_call
    wrap_controller.send(call_outcome)
E   RuntimeError: generator raised StopIteration
================================= 798 passed, 36 skipped, 5 xfailed, 1 error in 47.37 seconds ==================================
ERROR: InvocationError: '/Users/yen/Projects/py/.tox/py37-pytest29/bin/py.test --confcutdir=.. -rfsxX --junitxml=/Users/yen/Projects/py/.tox/py37-pytest29/log/junit-py37-pytest29.xml'
___________________________________________________________ summary ____________________________________________________________
ERROR:   py37-pytest29: commands failed

Tested on macOS High Sierra with Python 3.7 from MacPorts.

RonnyPfannschmidt commented 6 years ago

that is kind of expected

yan12125 commented 6 years ago

Looks like it's the old pytest that leads to incompatibility with Python 3.7 - https://github.com/pytest-dev/pytest/pull/2226. How about drop pytest 2.9 tests and add py37 to tox.ini to explicitly declare Python 3.7 is compatible with py?

RonnyPfannschmidt commented 6 years ago

no need to drop 2.9 for the other pytons

The-Compiler commented 6 years ago

Why would an up-to-date pylib need to retain pytest 2.9 compatibility though? 3.0 was released almost 2 years ago.

RonnyPfannschmidt commented 6 years ago

@The-Compiler just to avoid deliberately breaking people that are stuck for legacy reasons - as far as i can tell its not a extra cost to have it in ci as of now

yan12125 commented 6 years ago

Thanks for the explanations! I created a patch at #193 to prevent future confusions.