comparison babel/messages/tests/catalog.py @ 361:1b78b747b386

Updated catalog test case for last commit, flags are now tested too in the clone test case.
author aronacher
date Tue, 17 Jun 2008 21:56:50 +0000
parents 36408f068138
children cadc2f937a78
comparison
equal deleted inserted replaced
360:36408f068138 361:1b78b747b386
48 def test_clone_message_object(self): 48 def test_clone_message_object(self):
49 msg = catalog.Message('foo', locations=[('foo.py', 42)]) 49 msg = catalog.Message('foo', locations=[('foo.py', 42)])
50 clone = msg.clone() 50 clone = msg.clone()
51 clone.locations.append(('bar.py', 42)) 51 clone.locations.append(('bar.py', 42))
52 self.assertEqual(msg.locations, [('foo.py', 42)]) 52 self.assertEqual(msg.locations, [('foo.py', 42)])
53 msg.flags.add('fuzzy')
54 assert not clone.fuzzy and msg.fuzzy
53 55
54 56
55 class CatalogTestCase(unittest.TestCase): 57 class CatalogTestCase(unittest.TestCase):
56 58
57 def test_two_messages_with_same_singular(self): 59 def test_two_messages_with_same_singular(self):
Copyright (C) 2012-2017 Edgewall Software