summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/tests/panelize/test_excellon.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-01-29 21:19:11 +0100
committerjaseg <git@jaseg.de>2022-01-29 21:19:26 +0100
commit6edc1bf6069f489fcc4ae11bc0523d8bfc31cfd8 (patch)
tree52c4c019ed5e37199f5efbafc17c4a096d5bbb32 /gerbonara/gerber/tests/panelize/test_excellon.py
parent1d0336056f2b29a95148768bfc5e805afad27cba (diff)
downloadgerbonara-6edc1bf6069f489fcc4ae11bc0523d8bfc31cfd8.tar.gz
gerbonara-6edc1bf6069f489fcc4ae11bc0523d8bfc31cfd8.tar.bz2
gerbonara-6edc1bf6069f489fcc4ae11bc0523d8bfc31cfd8.zip
Fix zero suppression handling and remove more old files
Diffstat (limited to 'gerbonara/gerber/tests/panelize/test_excellon.py')
-rw-r--r--gerbonara/gerber/tests/panelize/test_excellon.py60
1 files changed, 0 insertions, 60 deletions
diff --git a/gerbonara/gerber/tests/panelize/test_excellon.py b/gerbonara/gerber/tests/panelize/test_excellon.py
deleted file mode 100644
index 1d255cc..0000000
--- a/gerbonara/gerber/tests/panelize/test_excellon.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-# Copyright 2019 Hiroshi Murayama <opiopan@gmail.com>
-
-import os
-import tempfile
-from pathlib import Path
-from contextlib import contextmanager
-import unittest
-from ... import panelize
-
-class TestExcellon(unittest.TestCase):
- @classmethod
- def setUpClass(cls):
- here = Path(__file__).parent
- cls.EXPECTSDIR = here / 'expects'
- cls.METRIC_FILE = here / 'data' / 'ref_drill_metric.txt'
- cls.INCH_FILE = here / 'data' / 'ref_drill_inch.txt'
-
- @contextmanager
- def _check_result(self, reference_fn):
- with tempfile.NamedTemporaryFile('rb') as tmp_out:
- yield tmp_out.name
-
- actual = tmp_out.read()
- expected = (self.EXPECTSDIR / reference_fn).read_bytes()
- self.assertEqual(actual, expected)
-
- def test_save(self):
- with self._check_result('excellon_save.txt') as outfile:
- drill = panelize.read(self.METRIC_FILE)
- drill.write(outfile)
-
- def test_to_inch(self):
- with self._check_result('excellon_to_inch.txt') as outfile:
- drill = panelize.read(self.METRIC_FILE)
- drill.to_inch()
- drill.format = (2, 4)
- drill.write(outfile)
-
- def test_to_metric(self):
- with self._check_result('excellon_to_metric.txt') as outfile:
- drill = panelize.read(self.INCH_FILE)
- drill.to_metric()
- drill.format = (3, 3)
- drill.write(outfile)
-
- def test_offset(self):
- with self._check_result('excellon_offset.txt') as outfile:
- drill = panelize.read(self.METRIC_FILE)
- drill.offset(11, 5)
- drill.write(outfile)
-
- def test_rotate(self):
- with self._check_result('excellon_rotate.txt') as outfile:
- drill = panelize.read(self.METRIC_FILE)
- drill.rotate(20, (10, 10))
- drill.write(outfile)
-