STINNER Victor <victor.stin...@haypocalc.com> added the comment:

Why do you remove NTColor from globals *after* creating it? The assertion looks 
useless, or are you testing that globals().pop() works as expected?

tmp = namedtuple('NTColor', 'red green blue')
globals().pop('NTColor', None)          # remove artifacts from other tests
self.assertNotIn('NTColor', globals())

Can't you remove NTColor from globals before creating it?

globals().pop('NTColor', None)
tmp = namedtuple('NTColor', 'red green blue')
self.assertNotIn('NTColor', globals())

It looks like I missed something important :-)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11661>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to