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

TestConfigurationWatcher tests fail with pytest 3.10 for python2 #104

Open
sdelafond opened this issue Dec 14, 2018 · 1 comment
Open

TestConfigurationWatcher tests fail with pytest 3.10 for python2 #104

sdelafond opened this issue Dec 14, 2018 · 1 comment
Labels

Comments

@sdelafond
Copy link

All the tests in TestConfigurationWatcher fail the same way with pytest 3.10:

pytest -vvv -k test_should_check
=================================================================================================================================== test session starts ===================================================================================================================================
platform linux2 -- Python 2.7.15+, pytest-3.10.1, py-1.7.0, pluggy-0.8.0 -- /usr/bin/python2
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/seb/vcs/pystaticconfiguration/.hypothesis/examples')
rootdir: /home/seb/vcs/pystaticconfiguration, inifile:
plugins: hypothesis-3.71.11
collected 142 items / 141 deselected

tests/config_test.py::TestConfigurationWatcher::test_should_check
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/_pytest/main.py", line 184, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/_pytest/main.py", line 224, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/pluggy/hooks.py", line 284, in call
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/pluggy/manager.py", line 67, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/pluggy/manager.py", line 61, in
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/pluggy/callers.py", line 81, in get_result
INTERNALERROR> _reraise(*ex) # noqa
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/_pytest/main.py", line 245, in pytest_runtestloop
INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/pluggy/hooks.py", line 284, in call
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/pluggy/manager.py", line 67, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/pluggy/manager.py", line 61, in
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/pluggy/callers.py", line 81, in get_result
INTERNALERROR> _reraise(*ex) # noqa
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/_pytest/runner.py", line 77, in pytest_runtest_protocol
INTERNALERROR> runtestprotocol(item, nextitem=nextitem)
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/_pytest/runner.py", line 86, in runtestprotocol
INTERNALERROR> rep = call_and_report(item, "setup", log)
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/_pytest/runner.py", line 173, in call_and_report
INTERNALERROR> hook = item.ihook
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/_pytest/nodes.py", line 118, in ihook
INTERNALERROR> return self.session.gethookproxy(self.fspath)
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/_pytest/main.py", line 418, in gethookproxy
INTERNALERROR> my_conftestmodules = pm._getconftestmodules(fspath)
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/_pytest/config/init.py", line 409, in _getconftestmodules
INTERNALERROR> for parent in directory.realpath().parts():
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 588, in realpath
INTERNALERROR> return self.class(os.path.realpath(self.strpath))
INTERNALERROR> File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 154, in init
INTERNALERROR> raise ValueError("can only pass None, Path instances "
INTERNALERROR> ValueError: can only pass None, Path instances or non-empty strings to LocalPath

For reference, this is debian bug #915765 (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=915765).

@sdelafond
Copy link
Author

The issue is somewhere in setup_mocks_and_config_watcher(), so #103 came to mind, but FTR all the tests are passing using pytest-3 3.10, so this issue really is limited to pytest-2.

@dnephin dnephin added the bug label Dec 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants