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 rhettinger
Recipients brett.cannon, ezio.melotti, jcea, rhettinger
Date 2011-05-07.21:39:45
SpamBayes Score 0.003015646
Marked as misclassified No
Message-id <1304804386.68.0.0328005531323.issue11910@psf.upfronthosting.co.za>
In-reply-to
Content
I'm imagining a cleaner testing style, like this:

class TestHeap(unittest.TestCase):

    def test_nsmallest(self):
        self.assertEqual(heapq.nsmallest(3, range(10)), [0,1,2])
        ...

    @test_support.requires('_heapq')
    def test_comparison_operator(self):
        ...

def test_main(verbose=None):
    test_classes = [TestHeapPython, TestErrorHandling]
    test_support.run_unittest(*test_classes)

    test_support.reload('heapq', hiding='_heapq')
    test_support.run_unittest(*test_classes)

Ideally, we should be able to hide individual methods and be able to mark entire test classes with decorators for required features.
History
Date User Action Args
2011-05-07 21:39:46rhettingersetrecipients: + rhettinger, brett.cannon, jcea, ezio.melotti
2011-05-07 21:39:46rhettingersetmessageid: <1304804386.68.0.0328005531323.issue11910@psf.upfronthosting.co.za>
2011-05-07 21:39:45rhettingerlinkissue11910 messages
2011-05-07 21:39:45rhettingercreate