From a9783ee71aef22aba8d429da16d46a8b24015f3a Mon Sep 17 00:00:00 2001 From: Yi-Mu Chen Date: Mon, 30 Oct 2023 16:55:11 +0100 Subject: [PATCH] Disabling specific pylint --- tests/test_histread.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_histread.py b/tests/test_histread.py index 93607563..27de29fa 100644 --- a/tests/test_histread.py +++ b/tests/test_histread.py @@ -47,8 +47,10 @@ def test_default_read(self): """ try: readout = read_hist(TestHistUtils.base_hist) + # pylint: disable=W0702 except: self.fail("Histogram reading raised an unexpected exception.") + # pylint: enable=W0702 # Checking dimension compatibility self.assertTrue(len(readout["dataset"]) == len(readout["flavor"])) @@ -67,8 +69,11 @@ def test_projection_read(self): TestHistUtils.base_hist[{"dataset": "data", "flavor": sum}] ) read2 = read_hist(TestHistUtils.base_hist[{"dataset": "QCD", "flavor": 0j}]) + # pylint: disable=W0702 except: self.fail("Histogram reading raised an unexpected exception.") + # pylint: enable=W0702 + # Checking dimension compatibility self.assertTrue(len(read1["eta"]) == len(read1["pt"])) self.assertTrue(len(read1["eta"]) == len(read2["pt"])) @@ -106,8 +111,10 @@ def test_uncertainty_generation(self): "asymmetric histogram": (q_h, t_h), }, ) + # pylint: disable=W0702 except: self.fail("Unexpected exception of automatic uncertainty generation.") + # pylint: enable=W0702 def check_val(arr1, arr2): return self.assertTrue( @@ -157,8 +164,10 @@ def test_table_generation(self): axes_rename=_rename_, axes_units=_units_, ) + # pylint: disable=W0702 except: self.fail("Unexpected exception of table generation.") + # pylint: enable=W0702 readout = read_hist(TestHistUtils.base_hist)