We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70f79a7 commit de54ef7Copy full SHA for de54ef7
tests/test_osi_trace.py
@@ -22,6 +22,20 @@ def test_osi_trace(self):
22
23
self.assertTrue(os.path.exists(path_output))
24
25
+ def test_osi_trace_offsets_robustness(self):
26
+ with tempfile.TemporaryDirectory() as tmpdirname:
27
+ path_input = os.path.join(tmpdirname, "input.osi")
28
+ create_sample(path_input)
29
+
30
+ trace = OSITrace(path_input)
31
+ # Test whether the function can handle be run multiple times safely
32
+ offsets = trace.retrieve_offsets(None)
33
+ offsets2 = trace.retrieve_offsets(None)
34
+ trace.close()
35
36
+ self.assertEqual(len(offsets), 10)
37
+ self.assertEqual(offsets, offsets2)
38
39
40
def create_sample(path):
41
f = open(path, "ab")
0 commit comments