Skip to content

Commit ea24c57

Browse files
committed
Added cover pragma to tests themselves
1 parent 635bc3d commit ea24c57

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/test_trace_class.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def setUp(self):
1919
self.output_dir = os.path.join('test_output', 'test_trace_class')
2020

2121
if not os.path.exists(self.output_dir):
22-
os.makedirs(self.output_dir)
22+
os.makedirs(self.output_dir) # pragma: no-cover
2323
self.test_trace = tr(filepath, json_file)
2424

2525
def test_protocol_descriptions(self):
@@ -60,11 +60,10 @@ def voltage_func(t):
6060
for tstart, tend, vstart, vend in voltage_protocol.get_all_sections():
6161
if t >= tstart and t < tend:
6262
if vstart != vend:
63-
return vstart + (vend - vstart) * (t - tstart)/(tend - tstart)
63+
return vstart + (vend - vstart) * (t - tstart) / (tend - tstart)
6464
else:
6565
return vstart
66-
67-
return voltage_protocol.get_holding_potential()
66+
return voltage_protocol.get_holding_potential() # pragma: no-cover
6867

6968
for t, v in zip(times, voltages):
7069
self.assertLess(voltage_func(t) - v, 1e-3)

0 commit comments

Comments
 (0)