1import unittest 2 3from pgxnclient import Spec 4 5 6class SpecTestCase(unittest.TestCase): 7 def test_str(self): 8 self.assertEqual(str(Spec('foo')), 'foo') 9 self.assertEqual(str(Spec('foo>2.0')), 'foo>2.0') 10 self.assertEqual(str(Spec('foo>2.0')), 'foo>2.0') 11 self.assertEqual(str(Spec(dirname='/foo')), '/foo') 12 self.assertEqual(str(Spec(dirname='/foo/foo.zip')), '/foo/foo.zip') 13 14 15if __name__ == '__main__': 16 unittest.main() 17