diff options
author | Michał Górny <mgorny@gentoo.org> | 2017-10-25 10:14:07 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2017-10-25 10:14:07 +0200 |
commit | 9caebb790345d4351051f97c9e7341aa2af0c808 (patch) | |
tree | 9c96276e65fa9e9db98507d3bfdade98831cbd63 /tests/test_manifest.py | |
parent | 574879859ab0003d3158dd8fbbcc0645c775eaa9 (diff) | |
download | gemato-9caebb790345d4351051f97c9e7341aa2af0c808.tar.gz |
manifest: Wipe old entries when loading next file
Diffstat (limited to 'tests/test_manifest.py')
-rw-r--r-- | tests/test_manifest.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_manifest.py b/tests/test_manifest.py index 18fe099..8fd3b9c 100644 --- a/tests/test_manifest.py +++ b/tests/test_manifest.py @@ -104,6 +104,17 @@ class ManifestTest(unittest.TestCase): self.assertListEqual(list(m.find_manifests_for_path('eclass/foo.eclass')), [m.find_path_entry('eclass/Manifest')]) + def test_multiple_load(self): + """ + Test that calling load() multiple times overwrites previously + loaded data. + """ + m = gemato.manifest.ManifestFile() + m.load(io.StringIO(TEST_MANIFEST)) + m.load(io.StringIO(TEST_DEPRECATED_MANIFEST)) + self.assertIsNone(m.find_timestamp()) + self.assertIsNone(m.find_path_entry('eclass/Manifest')) + class ManifestEntryTest(unittest.TestCase): """ |