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