Skip to content

pytest hangs on os.stat('//tox.ini') on cygwin. #2135

@account-login

Description

@account-login

Running the command pytest on cygwin, it hangs. Then I hit ctrl-C to get a stack trace.

Traceback (most recent call last):
  File "/usr/bin/pytest", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python3.4/site-packages/_pytest/config.py", line 47, in main
    config = _prepareconfig(args, plugins)
  File "/usr/lib/python3.4/site-packages/_pytest/config.py", line 156, in _prepareconfig
    pluginmanager=pluginmanager, args=args)
  File "/usr/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "/usr/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/usr/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
    _MultiCall(methods, kwargs, hook.spec_opts).execute()
  File "/usr/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
    return _wrapped_call(hook_impl.function(*args), self.execute)
  File "/usr/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 250, in _wrapped_call
    wrap_controller.send(call_outcome)
  File "/usr/lib/python3.4/site-packages/_pytest/helpconfig.py", line 32, in pytest_cmdline_parse
    config = outcome.get_result()
  File "/usr/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 279, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
    self.result = func()
  File "/usr/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
    res = hook_impl.function(*args)
  File "/usr/lib/python3.4/site-packages/_pytest/config.py", line 910, in pytest_cmdline_parse
    self.parse(args)
  File "/usr/lib/python3.4/site-packages/_pytest/config.py", line 1067, in parse
    self._preparse(args, addopts=addopts)
  File "/usr/lib/python3.4/site-packages/_pytest/config.py", line 1021, in _preparse
    self._initini(args)
  File "/usr/lib/python3.4/site-packages/_pytest/config.py", line 960, in _initini
    r = determine_setup(ns.inifilename, ns.file_or_dir + unknown_args, warnfunc=self.warn)
  File "/usr/lib/python3.4/site-packages/_pytest/config.py", line 1276, in determine_setup
    rootdir, inifile, inicfg = getcfg([ancestor], warnfunc=warnfunc)
  File "/usr/lib/python3.4/site-packages/_pytest/config.py", line 1217, in getcfg
    if exists(p):
  File "/usr/lib/python3.4/site-packages/_pytest/config.py", line 1193, in exists
    return path.check()
  File "/usr/lib/python3.4/site-packages/py/_path/local.py", line 365, in check
    return exists(self.strpath)
  File "/usr/lib/python3.4/genericpath.py", line 19, in exists
    os.stat(path)
KeyboardInterrupt

Running pytest in a debugger shows that pytest hangs on os.stat('//tox.ini').
'//xxx.yy' is an UNC path on windows, windows thinks tox.ini is a host name, causing pytest to hang.

I'm using pytest (3.0.5) on Python 3.4.3. pip list attached:

amqp (1.4.9)
anyjson (0.3.3)
astroid (1.4.8)
backports-abc (0.4)
billiard (3.3.0.23)
celery (3.1.24)
cffi (0.9.2)
click (6.6)
codeclimate-test-reporter (0.2.0)
comtypes (1.1.3)
coverage (4.2)
coveralls (1.1)
cpp-coveralls (0.3.12)
decorator (4.0.10)
diff-highlight (1.2.0)
docopt (0.6.2)
drawille (0.1.0)
entrypoints (0.2.2)
flake8 (3.2.0)
Flask (0.11.1)
gevent (1.1.2)
gitdb (0.6.4)
GitPython (2.0.8)
graphviz (0.5.1)
greenlet (0.4.10)
http-prompt (0.8.0)
httpie (0.9.6)
ipykernel (4.5.0)
ipython (5.1.0)
ipython-genutils (0.1.0)
ipywidgets (5.2.2)
isort (4.2.5)
itsdangerous (0.24)
Jinja2 (2.8)
jsonschema (2.5.1)
jupyter (1.0.0)
jupyter-client (4.4.0)
jupyter-console (5.0.0)
jupyter-core (4.2.0)
kombu (3.0.37)
lazy-object-proxy (1.2.2)
MarkupSafe (0.23)
mccabe (0.5.2)
mistune (0.7.3)
msgpack-python (0.4.8)
mypy-lang (0.4.5)
nbconvert (4.2.0)
nbformat (4.1.0)
notebook (4.2.3)
numpy (1.9.2)
objgraph (3.0.2.dev0)
parsimonious (0.7.0)
pexpect (4.2.1)
pickleshare (0.7.4)
pip (9.0.1)
plumbum (1.6.2)
ply (3.6)
prompt-toolkit (1.0.7)
ptyprocess (0.5.1)
py (1.4.31)
pycodestyle (2.2.0)
pycparser (2.12)
pyflakes (1.3.0)
Pygments (2.1.3)
pylint (1.6.4)
pylint-pycharm (1.0.1)
pytest (3.0.5)
pytest-cov (2.4.0)
pytest-sugar (0.7.1)
pytz (2016.7)
pyzmq (15.2.0)
qtconsole (4.2.1)
redis (2.10.5)
requests (2.11.1)
setuptools (28.3.0)
shadowsocks (2.8.2)
simplegeneric (0.8.1)
six (1.10.0)
smmap (0.9.0)
termcolor (1.1.0)
terminado (0.6)
tornado (4.4.2)
traitlets (4.3.1)
umsgpack (0.1.0)
wcwidth (0.1.7)
Werkzeug (0.11.11)
wheel (0.29.0)
widgetsnbextension (1.2.6)
wrapt (1.10.8)
xonsh (0.4.7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: cygwincygwin platform-specific problem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions