summaryrefslogtreecommitdiff
path: root/gerber/tests
diff options
context:
space:
mode:
Diffstat (limited to 'gerber/tests')
-rw-r--r--gerber/tests/golden/example_single_quadrant.gbr16
-rw-r--r--gerber/tests/test_cairo_backend.py6
-rw-r--r--gerber/tests/test_primitives.py4
3 files changed, 21 insertions, 5 deletions
diff --git a/gerber/tests/golden/example_single_quadrant.gbr b/gerber/tests/golden/example_single_quadrant.gbr
new file mode 100644
index 0000000..b0a3166
--- /dev/null
+++ b/gerber/tests/golden/example_single_quadrant.gbr
@@ -0,0 +1,16 @@
+%FSLAX23Y23*%
+%MOIN*%
+%ADD10C,0.01*%
+G74*
+D10*
+%LPD*%
+G01X1100Y600D02*
+G03X700Y1000I-400J0D01*
+G03X300Y600I0J-400D01*
+G03X700Y200I400J0D01*
+G03X1100Y600I0J400D01*
+G01X300D02*
+X1100D01*
+X700Y200D02*
+Y1000D01*
+M02*
diff --git a/gerber/tests/test_cairo_backend.py b/gerber/tests/test_cairo_backend.py
index f358235..625a23e 100644
--- a/gerber/tests/test_cairo_backend.py
+++ b/gerber/tests/test_cairo_backend.py
@@ -182,6 +182,8 @@ def _test_render(gerber_path, png_expected_path, create_output_path = None):
with open(png_expected_path, 'rb') as expected_file:
expected_bytes = expected_file.read()
- assert_equal(expected_bytes, actual_bytes)
-
+ # Don't directly use assert_equal otherwise any failure pollutes the test results
+ equal = (expected_bytes == actual_bytes)
+ assert_true(equal)
+
return gerber
diff --git a/gerber/tests/test_primitives.py b/gerber/tests/test_primitives.py
index 261e6ef..e23d5f4 100644
--- a/gerber/tests/test_primitives.py
+++ b/gerber/tests/test_primitives.py
@@ -10,15 +10,13 @@ from .tests import *
def test_primitive_smoketest():
p = Primitive()
-<<<<<<< HEAD
try:
p.bounding_box
assert_false(True, 'should have thrown the exception')
except NotImplementedError:
pass
-=======
#assert_raises(NotImplementedError, p.bounding_box)
->>>>>>> 5476da8... Fix a bunch of rendering bugs.
+
p.to_metric()
p.to_inch()
try: