Skip to content

Commit

Permalink
Ignore url line in regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
domna committed Jul 4, 2024
1 parent 22ade3a commit 2ee7ce7
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from pathlib import Path

import pynxtools.dataconverter.convert as dataconverter
from numpy.testing import assert_equal
from pynxtools.dataconverter.convert import get_reader
from pynxtools.dataconverter.helpers import generate_template_from_nxdl
from pynxtools.dataconverter.template import Template
Expand Down Expand Up @@ -78,10 +79,20 @@ def test_mpes_writing(tmp_path):
with open(
os.path.join(tmp_path, "mpes_test.log"), "r", encoding="utf-8"
) as logfile:
log = logfile.readlines()
log = []
for line in logfile.readlines():
if not line.startswith(
"DEBUG - value: https://github.com/FAIRmat-NFDI/nexus_definitions/blob/"
):
log.append(line)
with open(dir_path / "Ref_nexus_mpes.log", "r", encoding="utf-8") as logfile:
ref_log = logfile.readlines()
assert log == ref_log
ref_log = []
for line in logfile.readlines():
if not line.startswith(
"DEBUG - value: https://github.com/FAIRmat-NFDI/nexus_definitions/blob/"
):
ref_log.append(line)
assert_equal(log, ref_log)


def test_shows_correct_warnings():
Expand Down

0 comments on commit 2ee7ce7

Please sign in to comment.