Skip to content

Commit

Permalink
adapting path to moved testfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
JoschD committed Jan 22, 2025
1 parent 8e4fea7 commit 91bec12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tests/unit/test_create_logbook_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
from tests.conftest import cli_args

INPUT = Path(__file__).parent.parent / "inputs"
INPUT_SPEC_FILES = INPUT / "plot_spectrum"


# noinspection PyTypeChecker
class TestMain:
text = "Here is some text"
files = (INPUT / "spec_test.sdds.linx", INPUT / "spec_test.sdds.liny")
files = (INPUT_SPEC_FILES / "spec_test.sdds.linx", INPUT_SPEC_FILES / "spec_test.sdds.liny")
filenames = ("testfile1.linx", "testfile2.liny")
tags=["Beam_1_Analysis", "Shift_Summary"]

Expand Down
5 changes: 3 additions & 2 deletions tests/unit/test_plot_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from omc3.plotting.spectrum.utils import PLANES, get_unique_filenames

INPUT_DIR = Path(__file__).parent.parent / "inputs"
INPUT_DIR_SPECTRUM = INPUT_DIR / "plot_spectrum"
# Forcing non-interactive Agg backend so rendering is done similarly across platforms during tests
matplotlib.use("Agg")

Expand Down Expand Up @@ -81,7 +82,7 @@ def test_no_tunes_in_files_plot(tmp_path, file_path, bpms):

for f in glob(f"{file_path}*"):
print(f)
for f in INPUT_DIR.glob(f"{file_path.name}*"):
for f in INPUT_DIR_SPECTRUM.glob(f"{file_path.name}*"):
copy(f, tmp_path)
file_path = tmp_path / file_path.name
for p in PLANES:
Expand Down Expand Up @@ -137,7 +138,7 @@ def _get_output_dir(tmp_path, file_path):

@pytest.fixture
def file_path():
return INPUT_DIR / "plot_spectrum" / "spec_test.sdds"
return INPUT_DIR_SPECTRUM / "spec_test.sdds"


@pytest.fixture
Expand Down

0 comments on commit 91bec12

Please sign in to comment.