Пример #1
0
 def test_autodetect(self):
     """ The fritzing autodetection works. """
     self.assertEqual(
         Fritzing.auto_detect(join(TEST_DIR, '..', 'kicad', 'conn.sch')),
         0.0)
     self.assertEqual(Fritzing.auto_detect(join(TEST_DIR, "Wiring.fzz")),
                      0.9)
     self.assertEqual(Fritzing.auto_detect(join(TEST_DIR, "Wiring.fz")),
                      0.9)
 def test_autodetect(self):
     """ The fritzing autodetection works. """
     self.assertEqual(Fritzing.auto_detect(join(TEST_DIR, '..', 'kicad',
                                                'conn.sch')), 0.0)
     self.assertEqual(Fritzing.auto_detect(join(TEST_DIR, "Wiring.fzz")), 0.9)
     self.assertEqual(Fritzing.auto_detect(join(TEST_DIR, "Wiring.fz")), 0.9)
 def load_file(self, basename):
     """ Load a fritzing test file with the given basename """
     parser = Fritzing()
     return parser.parse(join(TEST_DIR, basename))
Пример #4
0
 def test_create_new_fritzing_parser(self):
     """ Test creating an empty parser. """
     parser = Fritzing()
     assert parser != None
Пример #5
0
 def load_file(self, basename):
     """ Load a fritzing test file with the given basename """
     parser = Fritzing()
     return parser.parse(join(TEST_DIR, basename))
 def test_autodetect(self):
     """ The frizting autodetection works. """
     self.assertEqual(Fritzing.auto_detect("notfritzing"), 0.0)
     self.assertEqual(Fritzing.auto_detect("fritzing.fzz"), 0.9)
     self.assertEqual(Fritzing.auto_detect(join(TEST_DIR, "components.fzz")), 0.9)