From 70179a4178d6574182cbc80de211a933b79ffa8a Mon Sep 17 00:00:00 2001 From: jaseg Date: Tue, 21 Feb 2023 23:43:59 +0100 Subject: Finish first batch of render tests --- gerbonara/tests/test_cli.py | 77 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) (limited to 'gerbonara/tests') diff --git a/gerbonara/tests/test_cli.py b/gerbonara/tests/test_cli.py index b42a216..e085894 100644 --- a/gerbonara/tests/test_cli.py +++ b/gerbonara/tests/test_cli.py @@ -16,10 +16,15 @@ # limitations under the License. # +import math from pathlib import Path +import re +import tempfile +import json import pytest from click.testing import CliRunner +from bs4 import BeautifulSoup from .utils import * from ..cli import render, rewrite, transform, merge, bounding_box, layers, meta @@ -28,7 +33,6 @@ class TestRender: def invoke(self, *args): runner = CliRunner() res = runner.invoke(render, list(map(str, args))) - print(res.output) assert res.exit_code == 0 return res.output @@ -40,3 +44,74 @@ class TestRender: with pytest.warns(UserWarning): self.invoke(reference, '--warnings=once') + @pytest.mark.parametrize('reference', ['kicad-older'], indirect=True) + def test_side(self, reference): + without = self.invoke(reference, '--warnings=ignore') + top = self.invoke(reference, '--top', '--warnings=ignore') + bottom = self.invoke(reference, '--bottom', '--warnings=ignore') + assert top.strip().startswith('