From 52c6d4928a1b5fc65b95cf5b0784a560cec2ca1d Mon Sep 17 00:00:00 2001 From: Garret Fick Date: Sat, 16 Jul 2016 15:49:48 +0800 Subject: Fix most broken tests so that I can safely merge into changes with known expected test result --- gerber/tests/test_excellon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gerber/tests/test_excellon.py') diff --git a/gerber/tests/test_excellon.py b/gerber/tests/test_excellon.py index 705adc3..afc2917 100644 --- a/gerber/tests/test_excellon.py +++ b/gerber/tests/test_excellon.py @@ -78,8 +78,9 @@ def test_conversion(): for m_tool, i_tool in zip(iter(ncdrill.tools.values()), iter(ncdrill_inch.tools.values())): assert_equal(i_tool, m_tool) - for m, i in zip(ncdrill.primitives,inch_primitives): - assert_equal(m, i) + for m, i in zip(ncdrill.primitives, inch_primitives): + assert_equal(m.position, i.position, '%s not equal to %s' % (m, i)) + assert_equal(m.diameter, i.diameter, '%s not equal to %s' % (m, i)) def test_parser_hole_count(): -- cgit From 8cd842a41a55ab3d8f558a2e3e198beba7da58a1 Mon Sep 17 00:00:00 2001 From: Hamilton Kibbe Date: Thu, 21 Jan 2016 03:57:44 -0500 Subject: Manually mere rendering changes --- gerber/tests/test_excellon.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gerber/tests/test_excellon.py') diff --git a/gerber/tests/test_excellon.py b/gerber/tests/test_excellon.py index cd94b0f..1402938 100644 --- a/gerber/tests/test_excellon.py +++ b/gerber/tests/test_excellon.py @@ -13,6 +13,7 @@ from .tests import * NCDRILL_FILE = os.path.join(os.path.dirname(__file__), 'resources/ncdrill.DRD') + def test_format_detection(): """ Test file type detection """ @@ -75,7 +76,8 @@ def test_conversion(): for statement in ncdrill_inch.statements: statement.to_metric() - for m_tool, i_tool in zip(iter(ncdrill.tools.values()), iter(ncdrill_inch.tools.values())): + for m_tool, i_tool in zip(iter(ncdrill.tools.values()), + iter(ncdrill_inch.tools.values())): assert_equal(i_tool, m_tool) for m, i in zip(ncdrill.primitives, inch_primitives): @@ -188,12 +190,10 @@ def test_parse_incremental_position(): p = ExcellonParser(FileSettings(notation='incremental')) p._parse_line('X01Y01') p._parse_line('X01Y01') - assert_equal(p.pos, [2.,2.]) + assert_equal(p.pos, [2., 2.]) def test_parse_unknown(): p = ExcellonParser(FileSettings()) p._parse_line('Not A Valid Statement') assert_equal(p.statements[0].stmt, 'Not A Valid Statement') - - -- cgit