Exemplo n.º 1
0
    def test_token_dimensions(self):
        token = WXFToken(None)
        token.dimensions = [1, 2, 3]
        self.assertEqual(token.element_count, 6)

        token.dimensions = [2, 2, 3]
        self.assertEqual(token.element_count, 12)
Exemplo n.º 2
0
 def test_token_dimensions_notint(self):
     token = WXFToken(None)
     with self.assertRaises(TypeError):
         token.dimensions = [2, 2.1, 3]
         token.element_count
Exemplo n.º 3
0
 def test_token_dimensions_negative(self):
     token = WXFToken(None)
     with self.assertRaises(TypeError):
         token.dimensions = [2, -2, 3]
         token.element_count