Skip to content

Commit 20fbd4f

Browse files
committed
Added cover pragmas to command line handling
1 parent 334f924 commit 20fbd4f

9 files changed

Lines changed: 11 additions & 8 deletions

pcpostprocess/scripts/run_herg_qc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def starmap(n, func, iterable):
4040
return pool.starmap(func, iterable)
4141

4242

43-
def run_from_command_line():
43+
def run_from_command_line(): # pragma: no cover
4444
"""
4545
Reads arguments from the command line and an ``export_config.py`` and then
4646
runs herg QC.

pcpostprocess/scripts/summarise_herg_export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def get_protocol_list(input_dir, experiment_name):
3737
return list(np.unique(protocols))
3838

3939

40-
def run_from_command_line():
40+
def run_from_command_line(): # pragma: no cover
4141
"""
4242
Parses arguments from the command line and then ???
4343
"""

pcpostprocess/tests/test_directory_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_directory_builder(self):
3535
self.assertRegex(info_dict['Commit'], r'^g[0-9a-fA-F]{9}$')
3636

3737

38-
if __name__ == '__main__':
38+
if __name__ == '__main__': # pragma: no cover
3939
if '-store' in sys.argv:
4040
store_output = True
4141
sys.argv.remove('-store')

pcpostprocess/tests/test_herg_qc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ def test_run_qc(self):
870870
self.assertEqual(QC.all_passed(), ex_pass, trace)
871871

872872

873-
if __name__ == '__main__':
873+
if __name__ == '__main__': # pragma: no cover
874874
if '-store' in sys.argv:
875875
sys.argv.remove('-store')
876876
store_output = True

pcpostprocess/tests/test_infer_reversal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def test_infer_reversal(self):
6262
self.assertAlmostEqual(erev, -89.57184, 5)
6363

6464

65-
if __name__ == "__main__":
65+
if __name__ == "__main__": # pragma: no cover
6666
if '-store' in sys.argv:
6767
store_output = True
6868
sys.argv.remove('-store')

pcpostprocess/tests/test_leak_correct.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def test_get_leak_correct(self):
7777
self.assertEqual(x.shape, (30784,))
7878

7979

80-
if __name__ == "__main__":
80+
if __name__ == "__main__": # pragma: no cover
8181
if '-store' in sys.argv:
8282
sys.argv.remove('-store')
8383
store_output = True

pcpostprocess/tests/test_scripts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_run_herg_qc_and_summarise_herg_export(self):
5454
run_summarise(d1, d2, '13112023_MW2', reversal_potential=erev)
5555

5656

57-
if __name__ == "__main__":
57+
if __name__ == "__main__": # pragma: no cover
5858
if '-store' in sys.argv:
5959
sys.argv.remove('-store')
6060
store_output = True

pcpostprocess/tests/test_subtraction_plots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def test_do_subtraction_plot(self):
6767
fig.savefig(os.path.join(self.plot_dir, f'{well}.png'))
6868

6969

70-
if __name__ == "__main__":
70+
if __name__ == "__main__": # pragma: no cover
7171
if '-store' in sys.argv:
7272
sys.argv.remove('-store')
7373
store_output = True

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,7 @@ include = [
6868
source = [
6969
'pcpostprocess',
7070
]
71+
omit = [
72+
'pcpostprocess/__main__.py',
73+
]
7174

0 commit comments

Comments
 (0)