diff --git a/snapshottest/module.py b/snapshottest/module.py index e31b46c..ed8394a 100644 --- a/snapshottest/module.py +++ b/snapshottest/module.py @@ -255,7 +255,10 @@ def assert_match(self, value, name=""): try: prev_snapshot = self.module[self.test_name] except SnapshotNotFound: - self.store(value) # first time this test has been seen + if self.update: + self.store(value) # first time this test has been seen + else: + raise else: try: self.assert_value_matches_snapshot(value, prev_snapshot)