From f28500e3a5f73b7a0a2cce372618b284782d1a3b Mon Sep 17 00:00:00 2001 From: Constantine Evans Date: Wed, 26 Jan 2022 05:07:09 +0000 Subject: [PATCH] Use pyparsing 3 <=3.0.6; use np.allclose in plot tests pyparsing/pyparsing#359 causes command block parsing to fail. --- setup.cfg | 4 ++-- tests/test_experiment_file.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index f34b71f..5a5b16d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -62,8 +62,8 @@ install_requires = pandas >= 1 numpy >= 1 tabulate >= 0.8 - pyparsing >= 3 - typeguard >= 2 + pyparsing >=3,<=3.0.6 + typeguard >=2 nest_asyncio >= 1.5 click >=8.0,<9.0 toml diff --git a/tests/test_experiment_file.py b/tests/test_experiment_file.py index 43fba13..8aea044 100644 --- a/tests/test_experiment_file.py +++ b/tests/test_experiment_file.py @@ -2,6 +2,7 @@ # SPDX-License-Identifier: AGPL-3.0-only from pathlib import Path +import numpy as np import pytest @@ -48,7 +49,7 @@ def test_plots(exp: Experiment): # +2 here is for stage lines assert len(axf.get_lines()) == 5 * len(exp.all_filters) + 2 - assert axf.get_xlim() == (-0.004326652778519521, 0.09085970834891001) + assert np.allclose(axf.get_xlim(), (-0.004326652778519521, 0.09085970834891001)) with pytest.raises(ValueError, match="Samples not found"): exp.plot_over_time("Sampl(e|a)")