diff options
author | jaseg <git@jaseg.de> | 2023-11-14 20:48:29 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2023-11-14 21:54:04 +0100 |
commit | 51ef4882a16cecb29bb643100b432b22e1f3f76f (patch) | |
tree | 783342aea003bb60b03759b936a0bff618e9401b /gerbonara/tests/test_rs274x.py | |
parent | df75a2fddb1a2e4a23dd2fb65431879aab8dbfd6 (diff) | |
download | gerbonara-51ef4882a16cecb29bb643100b432b22e1f3f76f.tar.gz gerbonara-51ef4882a16cecb29bb643100b432b22e1f3f76f.tar.bz2 gerbonara-51ef4882a16cecb29bb643100b432b22e1f3f76f.zip |
Fix failing tests
Diffstat (limited to 'gerbonara/tests/test_rs274x.py')
-rw-r--r-- | gerbonara/tests/test_rs274x.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gerbonara/tests/test_rs274x.py b/gerbonara/tests/test_rs274x.py index 2fb51d9..f85b09f 100644 --- a/gerbonara/tests/test_rs274x.py +++ b/gerbonara/tests/test_rs274x.py @@ -298,7 +298,16 @@ def test_idempotence(reference, tmpfile): GerberFile.open(reference).save(tmp_gbr_1) GerberFile.open(tmp_gbr_1).save(tmp_gbr_2) - assert tmp_gbr_1.read_text() == tmp_gbr_2.read_text() + for left, right in zip(tmp_gbr_1.read_text().splitlines(), tmp_gbr_2.read_text().splitlines()): + # Substituted aperture macros have automatically generated names that are not stable between the first two + # generations, and the parametrization will be absent in the second generation. + ignored = [ + '0 Fully substituted instance of', + '0 Original parameters:'] + if any(left.startswith(s) and right.startswith(s) for s in ignored): + continue + + assert left == right TEST_ANGLES = [90, 180, 270, 1.5, 30, 360, 1024, -30] |