def test_children(self): one = ProjectConfig('one.toml') one.add_child(ProjectConfig('inner.toml')) one.set_locales(['ab']) other = ProjectConfig('one.toml') self.assertFalse(one.same(other)) other.add_child(ProjectConfig('inner.toml')) self.assertTrue(one.same(other))
def test_children(self): one = ProjectConfig('one.toml') one.add_child(ProjectConfig('inner.toml')) one.set_locales(['ab']) other = ProjectConfig('one.toml') self.assertFalse(one.same(other)) other.add_child(ProjectConfig('inner.toml')) self.assertTrue(one.same(other))
def test_locales_in_paths(self): pc = ProjectConfig(None) child = ProjectConfig(None) child.add_paths({ 'l10n': '/tmp/somedir/{locale}/toolkit/**', 'locales': ['it'] }) child.set_locales([]) pc.add_child(child) self.assertListEqual(pc.all_locales, ['it']) pc.set_locales(['de', 'fr']) self.assertListEqual(pc.all_locales, ['de', 'fr', 'it'])
def test_locales_in_paths(self): pc = ProjectConfig(None) child = ProjectConfig(None) child.add_paths({ 'l10n': '/tmp/somedir/{locale}/toolkit/**', 'locales': ['it'] }) child.set_locales([]) pc.add_child(child) self.assertListEqual(pc.all_locales, ['it']) pc.set_locales(['de', 'fr']) self.assertListEqual(pc.all_locales, ['de', 'fr', 'it'])
def test_children(self): pc = ProjectConfig(None) child = ProjectConfig(None) pc.add_child(child) self.assertListEqual([pc, child], list(pc.configs))
def test_children(self): pc = ProjectConfig(None) child = ProjectConfig(None) pc.add_child(child) self.assertListEqual([pc, child], list(pc.configs))