This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients pitrou, r.david.murray, rhettinger, vstinner
Date 2011-03-24.16:50:52
SpamBayes Score 1.4369613e-07
Marked as misclassified No
Message-id <1300985453.02.0.19916929226.issue11661@psf.upfronthosting.co.za>
In-reply-to
Content
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 :-)
History
Date User Action Args
2011-03-24 16:50:53vstinnersetrecipients: + vstinner, rhettinger, pitrou, r.david.murray
2011-03-24 16:50:53vstinnersetmessageid: <1300985453.02.0.19916929226.issue11661@psf.upfronthosting.co.za>
2011-03-24 16:50:52vstinnerlinkissue11661 messages
2011-03-24 16:50:52vstinnercreate