def test_check_string(self): dxftype = _DXFType() self.assertTrue(dxftype.check('string', 1)) self.assertFalse(dxftype.check(1.0, 1))
def test_check_int(self): dxftype = _DXFType() self.assertTrue(dxftype.check(1, 60)) self.assertFalse(dxftype.check('1', 60))
def test_check_group_code_error(self): dxftype = _DXFType() self.assertRaises(ValueError, dxftype.check, '0', 7777)
def test_check_bool(self): dxftype = _DXFType() self.assertTrue(dxftype.check(1, 290)) self.assertFalse(dxftype.check(2, 290))
def test_check_float(self): dxftype = _DXFType() self.assertTrue(dxftype.check(1.0, 10)) self.assertFalse(dxftype.check('1.0', 10))