self.assertEqual(type(action), actions.DoNothing)
self.assertEqual(action.required_bits, set())
self.assertEqual(location.replacement_time, None)
-
- def test_parse_bits(self):
- self.assertEqual(
- LocationCard.parse_bits([]), frozenset([]))
- self.assertEqual(
- LocationCard.parse_bits(['RED']), frozenset([BITS.RED]))
- self.assertEqual(
- LocationCard.parse_bits([BITS.BLUE]), frozenset([BITS.BLUE]))
- self.assertEqual(
- LocationCard.parse_bits([BITS.NORTH, 'MSB']),
- frozenset([BITS.NORTH, BITS.MSB]))
import pygame
-from naja.utils import convert_colour
+from naja.utils import convert_colour, parse_bits
+from naja.constants import BITS
class TestConvertColour(TestCase):
def test_string(self):
self.assertEqual(self.red, convert_colour('red'))
+
+
+class TestParseBits(TestCase):
+ def test_parse_bits(self):
+ self.assertEqual(parse_bits([]), frozenset([]))
+ self.assertEqual(parse_bits(['RED']), frozenset([BITS.RED]))
+ self.assertEqual(parse_bits([BITS.BLUE]), frozenset([BITS.BLUE]))
+ self.assertEqual(
+ parse_bits([BITS.NORTH, 'MSB']), frozenset([BITS.NORTH, BITS.MSB]))