From 22382f423c930424b864b9e395a7ba7de2394938 Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Sat, 21 Sep 2024 10:33:21 +0100 Subject: [PATCH] tests/: updated test_2608() to work with latest MuPDF. This reverses recent change. --- tests/resources/test_2608_expected | 6 +++--- tests/resources/test_2608_expected-1.24.x | 10 ---------- tests/test_font.py | 6 ++---- 3 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 tests/resources/test_2608_expected-1.24.x diff --git a/tests/resources/test_2608_expected b/tests/resources/test_2608_expected index 1592a79b2..d550f1237 100644 --- a/tests/resources/test_2608_expected +++ b/tests/resources/test_2608_expected @@ -1,9 +1,9 @@ No significant gamma-ray excess above the expected background is detected from the direction of FRB 20171019A, with 52 gamma candidate events from the source region and 524 background event. -A second analysis using an independent event calibration and reconstruction (Parsons & Hinton 2014) confirms this result.A search for -variable emission on timescales ranging from milliseconds to several minutes with tools provided in (Brun et al.2020) does not reveal -any variability above 2.2 𝜎.For the total data set of 1.8 h,95% confidence level (C.L.) upper limits on the photon flux are derived using +A second analysis using an independent event calibration and reconstruction (Parsons & Hinton 2014) confirms this result. A search for +variable emission on timescales ranging from milliseconds to several minutes with tools provided in (Brun et al. 2020) does not reveal +any variability above 2.2 𝜎. For the total data set of 1.8 h, 95% confidence level (C. L.) upper limits on the photon flux are derived using the method described by Rolke et al. (2005). The energy threshold of the data is highly dependent on the zenith angle of the observations. For these observations, the zenith angles range from 15 to 25 deg, which leads to an energy threshold for the stacked data set of diff --git a/tests/resources/test_2608_expected-1.24.x b/tests/resources/test_2608_expected-1.24.x deleted file mode 100644 index d550f1237..000000000 --- a/tests/resources/test_2608_expected-1.24.x +++ /dev/null @@ -1,10 +0,0 @@ -No significant gamma-ray excess above the expected background -is detected from the direction of FRB 20171019A, with 52 gamma -candidate events from the source region and 524 background event. -A second analysis using an independent event calibration and reconstruction (Parsons & Hinton 2014) confirms this result. A search for -variable emission on timescales ranging from milliseconds to several minutes with tools provided in (Brun et al. 2020) does not reveal -any variability above 2.2 𝜎. For the total data set of 1.8 h, 95% confidence level (C. L.) upper limits on the photon flux are derived using -the method described by Rolke et al. (2005). The energy threshold -of the data is highly dependent on the zenith angle of the observations. For these observations, the zenith angles range from 15 to 25 -deg, which leads to an energy threshold for the stacked data set of -𝐸th = 120 GeV. The upper limit on the Very High Energy (VHE) diff --git a/tests/test_font.py b/tests/test_font.py index 336408f2d..c807b3220 100644 --- a/tests/test_font.py +++ b/tests/test_font.py @@ -56,10 +56,8 @@ def test_2608(): text = blocks[10][4] with open(os.path.abspath(f'{__file__}/../../tests/test_2608_out'), 'wb') as f: f.write(text.encode('utf8')) - path_expected = 'tests/resources/test_2608_expected' - if pymupdf.mupdf_version_tuple < (1, 25): - path_expected += '-1.24.x' - with open(os.path.abspath(f'{__file__}/../../{path_expected}'), 'rb') as f: + path_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_2608_expected') + with open(path_expected, 'rb') as f: expected = f.read().decode('utf8') # Github windows x32 seems to insert \r characters; maybe something to # do with the Python installation's line endings settings.