def test_argument_repr(self): arg = Argument('foo') try: # Python 2.6 compatibility self.assertIn('foo', arg.__repr__()) except AttributeError: self.assertTrue('foo' in arg.__repr__()) self.assertTrue(arg.__repr__().startswith("Argument('foo'"))