[issue11178] Running tests inside a package by module name fails

2011-12-18 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

No longer reproducable on CPython. Unfortunately still an issue with unittest2.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11178
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11178] Running tests inside a package by module name fails

2011-05-23 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11178
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11178] Running tests inside a package by module name fails

2011-05-06 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

This isn't reproducable (any more?) on Python 2.7, but is on Python 3.2.

Running python -m unittest package doesn't find tests in submodules, but 
without running full discovery even when passed an explicit module name I don't 
think that is avoidable.

--
versions: +Python 3.3 -Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11178
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11178] Running tests inside a package by module name fails

2011-02-10 Thread Michael Foord

New submission from Michael Foord mich...@voidspace.org.uk:

Reported by a user and verified by me with both Python 2.7 and 3.2.

Trying to run tests by module or package name seems to fail.

directory structure:

project root: C:\Users\hpierson\Projects\pytest
\test
__init__.py (empty)
testfoo.py (sample test file

running test package by name - no tests discovered

C:\Users\hpierson\Projects\pytest
PS» cpy C:\Python31\Scripts\unit2.py test

--
Ran 0 tests in 0.000s

 

running test module by name - can't find module

C:\Users\hpierson\Projects\pytest
PS» cpy C:\Python31\Scripts\unit2.py test.testfoo
Traceback (most recent call last):
  File C:\Python31\Scripts\unit2.py, line 7, in module
main_()
  File C:\Python31\lib\site-packages\unittest2\main.py, line 237, in main_
main(module=None)
  File C:\Python31\lib\site-packages\unittest2\main.py, line 94, in __init__
self.parseArgs(argv)
  File C:\Python31\lib\site-packages\unittest2\main.py, line 149, in parseArgs
self.createTests()
  File C:\Python31\lib\site-packages\unittest2\main.py, line 158, in 
createTests
self.module)
  File C:\Python31\lib\site-packages\unittest2\loader.py, line 133, in 
loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
  File C:\Python31\lib\site-packages\unittest2\loader.py, line 133, in 
listcomp
suites = [self.loadTestsFromName(name, module) for name in names]
  File C:\Python31\lib\site-packages\unittest2\loader.py, line 101, in 
loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'testfoo'

--
assignee: michael.foord
components: Library (Lib)
messages: 128337
nosy: michael.foord
priority: normal
severity: normal
status: open
title: Running tests inside a package by module name fails
type: behavior
versions: Python 2.7, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11178
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com