Issue2538
Created on 2016-12-09.23:20:38 by jeff.allen, last changed 2017-02-01.19:25:43 by jeff.allen.
msg11001 (view) |
Author: Jeff Allen (jeff.allen) |
Date: 2016-12-09.23:20:37 |
|
Odd that this should have started happening:
======================================================================
FAIL: test_loadTestsFromName__relative_empty_name (__main__.Test_TestLoader)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\hg\jython-int\dist\Lib\test\test_unittest.py", line 328, in test_loadTestsFromName__relative_empty_name
self.fail("Failed to raise AttributeError")
AssertionError: Failed to raise AttributeError
======================================================================
FAIL: test_loadTestsFromNames__relative_empty_name (__main__.Test_TestLoader)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\hg\jython-int\dist\Lib\test\test_unittest.py", line 666, in test_loadTestsFromNames__relative_empty_name
self.fail("Failed to raise ValueError")
AssertionError: Failed to raise ValueError
----------------------------------------------------------------------
The cause appears to be that the unittest module does indeed have an attribute called '':
>>> import unittest
>>> getattr(unittest, '')
<module 'unittest.' from 'D:\hg\jython-int\dist\Lib\unittest\__init__$py.class'>
>>>
|
msg11002 (view) |
Author: Jeff Allen (jeff.allen) |
Date: 2016-12-10.08:17:52 |
|
Aha!
>>> import json
>>> json.__dict__.keys()
['__path__', '__builtins__', 'scanner', '__author__', 'encoder', '__doc__', 'decoder', '__file__', ...
>>> hasattr(json, '')
True
>>> json.__dict__.keys()
['__path__', '__builtins__', 'scanner', '__author__', 'encoder', '__doc__', 'decoder', '', '__file__', ...
>>>
The nameless attribute seems to be self-inventing (but only for PyModule).
|
msg11003 (view) |
Author: Jeff Allen (jeff.allen) |
Date: 2016-12-11.08:29:37 |
|
I claim fixed in #75bad1f35a71
|
|
Date |
User |
Action |
Args |
2017-02-01 19:25:43 | jeff.allen | set | status: pending -> closed |
2016-12-11 08:29:37 | jeff.allen | set | status: open -> pending resolution: fixed messages:
+ msg11003 |
2016-12-10 08:17:52 | jeff.allen | set | messages:
+ msg11002 |
2016-12-09 23:20:38 | jeff.allen | create | |
|