Example #1
0
 def test_with_float(self):
     with self.assertRaises(TypeError):
         safe_3D_point(1.1)
Example #2
0
 def test_with_str(self):
     with self.assertRaises(TypeError):
         safe_3D_point("abc")
Example #3
0
 def test_2D_point(self):
     self.assertEqual((1, 2, 0), safe_3D_point((1, 2)))
Example #4
0
 def test_1D_point(self):
     with self.assertRaises(ValueError):
         safe_3D_point((1, ))
Example #5
0
def test_with_str():
    with pytest.raises(DXFTypeError):
        safe_3D_point("abc")
Example #6
0
 def test_3D_point(self):
     self.assertEqual((1, 2, 3), safe_3D_point((1, 2, 3)))
Example #7
0
def test_1D_point():
    with pytest.raises(DXFValueError):
        safe_3D_point((1, ))
Example #8
0
def test_with_float():
    with pytest.raises(DXFTypeError):
        safe_3D_point(1.1)
Example #9
0
def test_3D_point():
    assert (1, 2, 3) == safe_3D_point((1, 2, 3))
Example #10
0
def test_2D_point():
    assert (1, 2, 0) == safe_3D_point((1, 2))
Example #11
0
 def test_with_str(self):
     with self.assertRaises(TypeError):
         safe_3D_point("abc")
Example #12
0
 def test_with_float(self):
     with self.assertRaises(TypeError):
         safe_3D_point(1.1)
Example #13
0
 def test_1D_point(self):
     with self.assertRaises(ValueError):
         safe_3D_point((1,))
Example #14
0
 def test_2D_point(self):
     self.assertEqual((1, 2, 0), safe_3D_point((1, 2)))
Example #15
0
 def test_3D_point(self):
     self.assertEqual((1, 2, 3), safe_3D_point((1, 2, 3)))