summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/tests/panelize/test_utility.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_utility.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_utility.py')
-rw-r--r--gerbonara/gerber/tests/panelize/test_utility.py48
1 files changed, 0 insertions, 48 deletions
diff --git a/gerbonara/gerber/tests/panelize/test_utility.py b/gerbonara/gerber/tests/panelize/test_utility.py
deleted file mode 100644
index f632d90..0000000
--- a/gerbonara/gerber/tests/panelize/test_utility.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-# Copyright 2019 Hiroshi Murayama <opiopan@gmail.com>
-
-import unittest
-
-from ...panelize.utility import *
-from math import sqrt
-
-class TestUtility(unittest.TestCase):
- def test_is_equal_value(self):
- a = 10.0001
- b = 10.01
-
- self.assertTrue(is_equal_value(a, b, 0.1))
- self.assertTrue(is_equal_value(a, b, 0.01))
- self.assertFalse(is_equal_value(a, b, 0.001))
- self.assertFalse(is_equal_value(a, b))
-
- self.assertTrue(is_equal_value(b, a, 0.1))
- self.assertTrue(is_equal_value(b, a, 0.01))
- self.assertFalse(is_equal_value(b, a, 0.001))
- self.assertFalse(is_equal_value(b, a))
-
- def test_is_equal_point(self):
- p0 = (10.01, 5.001)
- p1 = (10.0001, 5)
- self.assertTrue(is_equal_point(p0, p1, 0.1))
- self.assertTrue(is_equal_point(p0, p1, 0.01))
- self.assertFalse(is_equal_point(p0, p1, 0.001))
- self.assertFalse(is_equal_point(p0, p1))
- self.assertTrue(is_equal_point(p1, p0, 0.1))
- self.assertTrue(is_equal_point(p1, p0, 0.01))
- self.assertFalse(is_equal_point(p1, p0, 0.001))
- self.assertFalse(is_equal_point(p1, p0))
-
- p0 = (5.001, 10.01)
- p1 = (5, 10.0001)
- self.assertTrue(is_equal_point(p0, p1, 0.1))
- self.assertTrue(is_equal_point(p0, p1, 0.01))
- self.assertFalse(is_equal_point(p0, p1, 0.001))
- self.assertFalse(is_equal_point(p0, p1))
- self.assertTrue(is_equal_point(p1, p0, 0.1))
- self.assertTrue(is_equal_point(p1, p0, 0.01))
- self.assertFalse(is_equal_point(p1, p0, 0.001))
- self.assertFalse(is_equal_point(p1, p0))
-