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)
def test_token_dimensions_notint(self): token = WXFToken(None) with self.assertRaises(TypeError): token.dimensions = [2, 2.1, 3] token.element_count
def test_token_dimensions_negative(self): token = WXFToken(None) with self.assertRaises(TypeError): token.dimensions = [2, -2, 3] token.element_count