--- you can reply above this line ---
New issue 129: Test file names of the form foo_bar___init__.py error in 1.3.2,
1.3.3 and 1.3.4
http://bitbucket.org/hpk42/py-trunk/issue/129/test-file-names-of-the-form-foo_bar___init__py-error-in-132-133-and
trevorbaca on Tue, 12 Oct 2010 17:32:46 +0200:
Description:
Hi,
Starting in 1.3.2 test file names *ending with* the string '__init__.py' cause
py.test to fail.
This would seem to relate to #119 (fixed in 1.3.4). But this version of the
problem persists in the 1.3.4 public release.
In the example below, the file foo_bar___init__.py contains just a single print
statement:
Desktop$ py.test foo_bar__init__.py
======================================= test session starts
========================================
platform darwin -- Python 2.6.1 -- pytest-1.3.4
test path 1: foo_bar__init__.py
foo_bar__init__.py E
============================================== ERRORS
==============================================
__________________ ERROR collecting
/Users/trevorbaca/Desktop/foo_bar__init__.py ___________________
/Library/Python/2.6/site-packages/py-1.3.4-py2.6.egg/py/_plugin/pytest_runner.py:34:
in pytest_make_collect_report
> result = collector._memocollect()
/Library/Python/2.6/site-packages/py-1.3.4-py2.6.egg/py/_test/collect.py:230:
in _memocollect
> return self._memoizedcall('_collected', self.collect)
/Library/Python/2.6/site-packages/py-1.3.4-py2.6.egg/py/_test/collect.py:104:
in _memoizedcall
> res = function()
/Library/Python/2.6/site-packages/py-1.3.4-py2.6.egg/py/_test/pycollect.py:82:
in collect
> dicts = [getattr(self.obj, '__dict__', {})]
/Library/Python/2.6/site-packages/py-1.3.4-py2.6.egg/py/_test/pycollect.py:17:
in fget
> self._obj = obj = self._getobj()
/Library/Python/2.6/site-packages/py-1.3.4-py2.6.egg/py/_test/pycollect.py:140:
in _getobj
> return self._memoizedcall('_obj', self._importtestmodule)
/Library/Python/2.6/site-packages/py-1.3.4-py2.6.egg/py/_test/collect.py:104:
in _memoizedcall
> res = function()
/Library/Python/2.6/site-packages/py-1.3.4-py2.6.egg/py/_test/pycollect.py:145:
in _importtestmodule
> mod = self.fspath.pyimport(ensuresyspath=True)
/Library/Python/2.6/site-packages/py-1.3.4-py2.6.egg/py/_path/local.py:539: in
pyimport
> if not self.samefile(modfile):
/Library/Python/2.6/site-packages/py-1.3.4-py2.6.egg/py/_path/local.py:73: in
samefile
> return py.error.checked_call(os.path.samefile, str(self), str(other))
/Library/Python/2.6/site-packages/py-1.3.4-py2.6.egg/py/_error.py:80: in
checked_call
> raise cls("%s%r" % (func.__name__, args))
E ENOENT: [No such file or directory]:
samefile('/Users/trevorbaca/Desktop/foo_bar__init__.py',
'/Users/trevorbaca/Desktop/foo_ba')
===================================== 1 error in 0.09 seconds
======================================
This matters for us at www.projectabjad.org because we author tests for the
initializers of all of our classes in files named as FooBarClass___init__.py.
Trevor.
Responsible:
hpk42
--
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-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/py-dev