test: add test for state reload consistency

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-03-18 12:45:50 +02:00
parent f1e94b84fe
commit e9acd5a321
+6
View File
@@ -38,3 +38,9 @@ class TestState(TestDvc):
entry_md5 = state.update(path)
self.assertEqual(entry_md5, md5)
# Reload state db to make sure that it stays the same
old_db = state._db
state = State(self.dvc.root_dir, self.dvc.dvc_dir)
new_db = state._db
self.assertEqual(old_db, new_db)