nose-devs/nose — Issue #224: test.address() of a nose.case.Test defined in a doctest fails
Author: jpellerin
Created: 2011-12-14 16:04:16+00:00
State: closed

What steps will reproduce the problem?
1. nosetests --with-doctest --doctest-extension=.rst file_error.rst

I can't upload files at the moment (I get server errors), so I'll post
file_error.rst to the nose-dev mailing list.

What is the expected output? What do you see instead?

Expected: test passes
Got: failure:

F
======================================================================
FAIL: Doctest: file_error.rst
----------------------------------------------------------------------
Traceback (most recent call last):
File "doctest.py", line 2157, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for file_error.rst
File "/home/jlee/file_error.rst", line 0

----------------------------------------------------------------------
File "/home/jlee/file_error.rst", line 11, in file_error.rst
Failed example:
test.address()
Exception raised:
Traceback (most recent call last):
File "doctest.py", line 1248, in __run
compileflags, 1) in test.globs
File "", line 1, in ?
test.address()
File "/home/jlee/src/nose/nose/case.py", line 105, in address
return test_address(self.test)
File "/home/jlee/src/nose/nose/util.py", line 330, in test_address
cls_adr = test_address(test.__class__)
File "/home/jlee/src/nose/nose/util.py", line 317, in test_address
return (os.path.abspath(m.__file__), test.__module__, test.__name__)
AttributeError: 'module' object has no attribute '__file__'

----------------------------------------------------------------------
Ran 1 test in 0.006s

FAILED (failures=1)

What version of the product are you using? On what operating system?

http://python-nose.googlecode.com/svn/branches/0.10.0-stable revision 334

Please provide any additional information below.

Google Code Info:
Issue #: 100
Author: j...@pobox.com
Created On: 2007-09-21T17:24:24.000Z
Closed On: 2007-09-21T18:30:32.000Z