--- you can reply above this line ---

New issue 245: AttributeError launching pytest from pytest-runner
https://bitbucket.org/hpk42/pytest/issue/245/attributeerror-launching-pytest-from

Jason R. Coombs:

I've encountered an error launching pytest using 
[pytest-runner](/jaraco/pytest-runner) on Python 3.3. Using the same command on 
Python 2 works fine.  Note that pytest-runner is a very thin setuptools plugin 
for invoking pytest with the package dependencies loaded.

```
PS C:\Users\jaraco\projects\public\irc> ./setup ptr
zip_safe flag not set; analyzing archive contents...

Installed 
c:\users\jaraco\appdata\local\temp\easy_install-u9e25g\pytest-runner-1.2\hgtools-2.0.2-py3.3.egg

Installed c:\users\jaraco\projects\public\irc\pytest_runner-1.2-py3.3.egg
Searching for hgtools
Reading http://pypi.python.org/simple/hgtools/
Reading http://bitbucket.org/jaraco/hgtools/
Reading http://bitbucket.org/jaraco/hgtools/downloads/
Best match: hgtools 2.0.2
Downloading 
http://pypi.python.org/packages/source/h/hgtools/hgtools-2.0.2.zip#md5=be083d59512fbb21ac8d648c0b88446a
Processing hgtools-2.0.2.zip
Writing 
c:\users\jaraco\appdata\local\temp\easy_install-o0kvam\hgtools-2.0.2\setup.cfg
Running hgtools-2.0.2\setup.py -q bdist_egg --dist-dir 
c:\users\jaraco\appdata\local\temp\easy_install-o0kvam\hgtools-2.0.2\egg-dist-tmp-4y_v0l
zip_safe flag not set; analyzing archive contents...

Installed c:\users\jaraco\projects\public\irc\hgtools-2.0.2-py3.3.egg
running ptr
Checking .pth file support in .
C:\Python\pythonw.exe -E -c pass
running build_py
running egg_info
writing c:\users\jaraco\projects\public\irc\build\lib\irc.egg-info\PKG-INFO
writing dependency_links to 
c:\users\jaraco\projects\public\irc\build\lib\irc.egg-info\dependency_links.txt
writing top-level names to 
c:\users\jaraco\projects\public\irc\build\lib\irc.egg-info\top_level.txt
writing manifest file 
'c:\users\jaraco\projects\public\irc\build\lib\irc.egg-info\SOURCES.txt'
running build_ext
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File 
"C:\Python\lib\site-packages\pytest-2.3.4-py3.3.egg\_pytest\main.py", line 77, 
in wrap_session
INTERNALERROR>     config.pluginmanager.do_configure(config)
INTERNALERROR>   File 
"C:\Python\lib\site-packages\pytest-2.3.4-py3.3.egg\_pytest\core.py", line 268, 
in do_configure
INTERNALERROR>     config.hook.pytest_configure(config=self._config)
INTERNALERROR>   File 
"C:\Python\lib\site-packages\pytest-2.3.4-py3.3.egg\_pytest\core.py", line 422, 
in __call__
INTERNALERROR>     return self._docall(methods, kwargs)
INTERNALERROR>   File 
"C:\Python\lib\site-packages\pytest-2.3.4-py3.3.egg\_pytest\core.py", line 433, 
in _docall
INTERNALERROR>     res = mc.execute()
INTERNALERROR>   File 
"C:\Python\lib\site-packages\pytest-2.3.4-py3.3.egg\_pytest\core.py", line 351, 
in execute
INTERNALERROR>     res = method(**kwargs)
INTERNALERROR>   File 
"C:\Python\lib\site-packages\pytest-2.3.4-py3.3.egg\_pytest\pastebin.py", line 
18, in pytest_configure
INTERNALERROR>     __multicall__.execute()
INTERNALERROR>   File 
"C:\Python\lib\site-packages\pytest-2.3.4-py3.3.egg\_pytest\core.py", line 351, 
in execute
INTERNALERROR>     res = method(**kwargs)
INTERNALERROR>   File 
"C:\Python\lib\site-packages\pytest-2.3.4-py3.3.egg\_pytest\terminal.py", line 
42, in pytest_configure
INTERNALERROR>     encoding=stdout.encoding)
INTERNALERROR>   File 
"C:\Python\lib\site-packages\py-1.4.12-py3.3.egg\py\_io\capture.py", line 107, 
in dupfile
INTERNALERROR>     mode = mode and mode or f.mode
INTERNALERROR> AttributeError: '_io.TextIOWrapper' object has no attribute 
'mode'
```

I'm able to launch pytest naturally, so the issue is related to being launched 
under distribute/setuptools.

I'm posting this bug here first, even though the ultimate cause or resolution 
might be indicated in distribute or pytest-runner or py. I seek your advice on 
the nature of the problem. Should py/pytest support the _io.TextIOWrapper for 
.mode?


--

This is an issue notification from bitbucket.org. You are receiving
this either because you are the owner of the issue, or you are
following the issue.
_______________________________________________
py-svn mailing list
py-svn@codespeak.net
http://codespeak.net/mailman/listinfo/py-svn

Reply via email to