]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Add a test for header_comment updating. 307/head
authorAarni Koskela <akx@iki.fi>
Wed, 30 Dec 2015 14:39:48 +0000 (16:39 +0200)
committerAarni Koskela <akx@iki.fi>
Wed, 30 Dec 2015 14:39:48 +0000 (16:39 +0200)
tests/messages/test_catalog.py

index 31bb1d1404c8ee4b670ec7de1d6efcfb84d6b1d8..7d18d80a9ec267e7730432c150cb82317e27a2dc 100644 (file)
@@ -428,7 +428,7 @@ def test_catalog_add():
 
 
 def test_catalog_update():
-    template = catalog.Catalog()
+    template = catalog.Catalog(header_comment="# A Custom Header")
     template.add('green', locations=[('main.py', 99)])
     template.add('blue', locations=[('main.py', 100)])
     template.add(('salad', 'salads'), locations=[('util.py', 42)])
@@ -440,6 +440,7 @@ def test_catalog_update():
 
     cat.update(template)
     assert len(cat) == 3
+    assert cat.header_comment == template.header_comment  # Header comment also gets updated
 
     msg1 = cat['green']
     msg1.string