From: Mark Dickinson on 20 Mar 2010 07:00 On Mar 20, 6:52 am, Steven D'Aprano <st...(a)REMOVE-THIS- cybersource.com.au> wrote: > I've found this: > > http://docs.python.org/library/test.html > > and I've written a small test: > > $ cat test_unicode_interpolation.py > # For testinghttp://bugs.python.org/issue8128 > > import test.test_support > import unittest > > class K(unicode): > def __str__(self): return "Surprise!" > > class UnicodeInterpolationTest(unittest.TestCase): > def test_interpolation(self): > self.assertEquals(u'%s' % K('some text'), 'Surprise!') > > def test_main(): > test.test_support.run_unittest(UnicodeInterpolationTest) > > if __name__ == "__main__": > test_main() This looks like a fine start to me. I have a feeling that the current fashion is for assertEqual rather than assertEquals, but I might be wrong. :) -- Mark |