summaryrefslogtreecommitdiff
path: root/gerber/tests
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-08-06 09:51:58 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-08-06 09:51:58 +0800
commit8d5e782ccf220d77f0aad5a4e5605dc5cbe0f410 (patch)
tree8415fede2e664716a5b3a09fbb4c09baca78bcf8 /gerber/tests
parent8cd842a41a55ab3d8f558a2e3e198beba7da58a1 (diff)
downloadgerbonara-8d5e782ccf220d77f0aad5a4e5605dc5cbe0f410.tar.gz
gerbonara-8d5e782ccf220d77f0aad5a4e5605dc5cbe0f410.tar.bz2
gerbonara-8d5e782ccf220d77f0aad5a4e5605dc5cbe0f410.zip
Fix multiple problems with the merge. There are still errors, but I will intentionally leave them because future merges might resolve them
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: