From cf3374c9cc600ab4e59af8c498f721857f117215 Mon Sep 17 00:00:00 2001 From: Eduardo Rodrigues Date: Mon, 3 Jul 2023 12:22:09 +0200 Subject: [PATCH] Update other tests to use 2023 data --- tests/particle/test_generation.py | 10 +++++----- tests/particle/test_performance.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/particle/test_generation.py b/tests/particle/test_generation.py index 71799f60..1e7fc8e2 100644 --- a/tests/particle/test_generation.py +++ b/tests/particle/test_generation.py @@ -33,19 +33,19 @@ three_charge, ) -FILES = ["particle2021.csv", "particle2022.csv"] +FILES = ["particle2022.csv", "particle2023.csv"] def test_generate(tmp_path): "This verifies that the input and output files match." - particle2021 = tmp_path / "particle2021.csv" particle2022 = tmp_path / "particle2022.csv" + particle2023 = tmp_path / "particle2023.csv" - produce_files(particle2021, particle2022, "DUMMY", "2022") + produce_files(particle2022, particle2023, "DUMMY", "2023") - particle2022_data = data.basepath / "particle2022.csv" - with particle2022.open() as src, particle2022_data.open() as res: + particle2023_data = data.basepath / "particle2023.csv" + with particle2023.open() as src, particle2023_data.open() as res: src_filtered = [line for line in src.readlines() if not line.startswith("#")] res_filtered = [line for line in res.readlines() if not line.startswith("#")] assert src_filtered == res_filtered diff --git a/tests/particle/test_performance.py b/tests/particle/test_performance.py index c32f5f37..70d52165 100644 --- a/tests/particle/test_performance.py +++ b/tests/particle/test_performance.py @@ -4,19 +4,19 @@ def test_load_particle_table(benchmark): - benchmark(Particle.load_table, data.basepath / "particle2022.csv") + benchmark(Particle.load_table, data.basepath / "particle2023.csv") def test_load_nuclei_append(benchmark): def load_two(): - Particle.load_table(data.basepath / "particle2022.csv") + Particle.load_table(data.basepath / "particle2023.csv") Particle.load_table(data.basepath / "nuclei2022.csv", append=True) benchmark(load_two) def test_from_pdgid(benchmark): - Particle.load_table(data.basepath / "particle2022.csv") + Particle.load_table(data.basepath / "particle2023.csv") table = [int(s.pdgid) for s in Particle.all()] def get_all(listing):