Ejemplo n.º 1
0
def test_flags_disadvantage():
    token = flags()
    actual = token.parseString("!disadvantage")
    assert len(actual) == 1
    assert actual[0] == "!disadvantage"
Ejemplo n.º 2
0
def test_flags_disadvantage_mixed_case():
    token = flags()
    actual = token.parseString("!dIsAdVaNtAgE")
    assert len(actual) == 1
    assert actual[0] == "!disadvantage"
Ejemplo n.º 3
0
 def test_flags_dis_uppercase(self):
     token = flags()
     actual = token.parseString("!DIS")
     self.assertEqual(len(actual), 1)
     self.assertEqual(actual[0], "!dis")
Ejemplo n.º 4
0
def test_flags_take_uppercase():
    token = flags()
    actual = token.parseString("!TAKE")
    assert len(actual) == 1
    assert actual[0] == "!take"
Ejemplo n.º 5
0
def test_flags_advantage_mixed_case():
    token = flags()
    actual = token.parseString("!aDvAnTaGe")
    assert len(actual) == 1
    assert actual[0] == "!advantage"
Ejemplo n.º 6
0
def test_flags_grow_uppercase():
    token = flags()
    actual = token.parseString("!GROW")
    assert len(actual) == 1
    assert actual[0] == "!grow"
Ejemplo n.º 7
0
def test_flags_shrink():
    token = flags()
    actual = token.parseString("!shrink")
    assert len(actual) == 1
    assert actual[0] == "!shrink"
Ejemplo n.º 8
0
def test_flags_keep():
    token = flags()
    actual = token.parseString("!keep")
    assert len(actual) == 1
    assert actual[0] == "!keep"
Ejemplo n.º 9
0
def test_flags_keep_mixed_case():
    token = flags()
    actual = token.parseString("!kEeP")
    assert len(actual) == 1
    assert actual[0] == "!keep"
Ejemplo n.º 10
0
def test_flags_grow_mixed_case():
    token = flags()
    actual = token.parseString("!gRoW")
    assert len(actual) == 1
    assert actual[0] == "!grow"
Ejemplo n.º 11
0
def test_flags_grow_uppercase():
    token = flags()
    actual = token.parseString("!GROW")
    assert len(actual) == 1
    assert actual[0] == "!grow"
Ejemplo n.º 12
0
def test_flags_grow():
    token = flags()
    actual = token.parseString("!grow")
    assert len(actual) == 1
    assert actual[0] == "!grow"
Ejemplo n.º 13
0
def test_flags_drop_uppercase():
    token = flags()
    actual = token.parseString("!DROP")
    assert len(actual) == 1
    assert actual[0] == "!drop"
Ejemplo n.º 14
0
def test_flags_drop_mixed_case():
    token = flags()
    actual = token.parseString("!dRoP")
    assert len(actual) == 1
    assert actual[0] == "!drop"
Ejemplo n.º 15
0
def test_flags_drop_mixed_case():
    token = flags()
    actual = token.parseString("!dRoP")
    assert len(actual) == 1
    assert actual[0] == "!drop"
Ejemplo n.º 16
0
def test_flags_keep_uppercase():
    token = flags()
    actual = token.parseString("!KEEP")
    assert len(actual) == 1
    assert actual[0] == "!keep"
Ejemplo n.º 17
0
def test_flags_grow():
    token = flags()
    actual = token.parseString("!grow")
    assert len(actual) == 1
    assert actual[0] == "!grow"
Ejemplo n.º 18
0
def test_flags_shrink():
    token = flags()
    actual = token.parseString("!shrink")
    assert len(actual) == 1
    assert actual[0] == "!shrink"
Ejemplo n.º 19
0
def test_flags_keep_mixed_case():
    token = flags()
    actual = token.parseString("!kEeP")
    assert len(actual) == 1
    assert actual[0] == "!keep"
Ejemplo n.º 20
0
def test_flags_shrink_mixed_case():
    token = flags()
    actual = token.parseString("!sHrInK")
    assert len(actual) == 1
    assert actual[0] == "!shrink"
Ejemplo n.º 21
0
def test_flags_shrink_uppercase():
    token = flags()
    actual = token.parseString("!SHRINK")
    assert len(actual) == 1
    assert actual[0] == "!shrink"
Ejemplo n.º 22
0
def test_flags_shrink_uppercase():
    token = flags()
    actual = token.parseString("!SHRINK")
    assert len(actual) == 1
    assert actual[0] == "!shrink"
Ejemplo n.º 23
0
def test_flags_unknown_token():
    token = flags()
    with pytest.raises(ParseException):
        token.parseString("!shoop")
Ejemplo n.º 24
0
def test_flags_take_mixed_case():
    token = flags()
    actual = token.parseString("!tAkE")
    assert len(actual) == 1
    assert actual[0] == "!take"
Ejemplo n.º 25
0
def test_flags_dis_mixed_case():
    token = flags()
    actual = token.parseString("!dIs")
    assert len(actual) == 1
    assert actual[0] == "!dis"
Ejemplo n.º 26
0
def test_flags_take_uppercase():
    token = flags()
    actual = token.parseString("!TAKE")
    assert len(actual) == 1
    assert actual[0] == "!take"
Ejemplo n.º 27
0
 def test_flags_advantage_uppercase(self):
     token = flags()
     actual = token.parseString("!ADVANTAGE")
     self.assertEqual(len(actual), 1)
     self.assertEqual(actual[0], "!advantage")
Ejemplo n.º 28
0
def flags_only():
    return StringStart() + flags() + StringEnd()
Ejemplo n.º 29
0
 def test_flags_disadvantage(self):
     token = flags()
     actual = token.parseString("!disadvantage")
     self.assertEqual(len(actual), 1)
     self.assertEqual(actual[0], "!disadvantage")
Ejemplo n.º 30
0
def test_flags_unknown_token():
    token = flags()
    with pytest.raises(ParseException):
        token.parseString("!shoop")
Ejemplo n.º 31
0
def test_flags_disadvantage_mixed_case():
    token = flags()
    actual = token.parseString("!dIsAdVaNtAgE")
    assert len(actual) == 1
    assert actual[0] == "!disadvantage"
Ejemplo n.º 32
0
def test_flags_adv():
    token = flags()
    actual = token.parseString("!adv")
    assert len(actual) == 1
    assert actual[0] == "!adv"
Ejemplo n.º 33
0
def test_flags_drop_uppercase():
    token = flags()
    actual = token.parseString("!DROP")
    assert len(actual) == 1
    assert actual[0] == "!drop"
Ejemplo n.º 34
0
def test_flags_advantage_mixed_case():
    token = flags()
    actual = token.parseString("!aDvAnTaGe")
    assert len(actual) == 1
    assert actual[0] == "!advantage"
Ejemplo n.º 35
0
def test_flags_grow_mixed_case():
    token = flags()
    actual = token.parseString("!gRoW")
    assert len(actual) == 1
    assert actual[0] == "!grow"
Ejemplo n.º 36
0
def test_flags_advantage_uppercase():
    token = flags()
    actual = token.parseString("!ADVANTAGE")
    assert len(actual) == 1
    assert actual[0] == "!advantage"
Ejemplo n.º 37
0
def test_flags_keep():
    token = flags()
    actual = token.parseString("!keep")
    assert len(actual) == 1
    assert actual[0] == "!keep"
Ejemplo n.º 38
0
def test_flags_dis_mixed_case():
    token = flags()
    actual = token.parseString("!dIs")
    assert len(actual) == 1
    assert actual[0] == "!dis"
Ejemplo n.º 39
0
def test_flags_keep_uppercase():
    token = flags()
    actual = token.parseString("!KEEP")
    assert len(actual) == 1
    assert actual[0] == "!keep"
Ejemplo n.º 40
0
def test_flags_dis_uppercase():
    token = flags()
    actual = token.parseString("!DIS")
    assert len(actual) == 1
    assert actual[0] == "!dis"
Ejemplo n.º 41
0
def test_flags_shrink_mixed_case():
    token = flags()
    actual = token.parseString("!sHrInK")
    assert len(actual) == 1
    assert actual[0] == "!shrink"
Ejemplo n.º 42
0
 def test_flags_shrink_uppercase(self):
     token = flags()
     actual = token.parseString("!SHRINK")
     self.assertEqual(len(actual), 1)
     self.assertEqual(actual[0], "!shrink")
Ejemplo n.º 43
0
def test_flags_take_mixed_case():
    token = flags()
    actual = token.parseString("!tAkE")
    assert len(actual) == 1
    assert actual[0] == "!take"
Ejemplo n.º 44
0
 def test_flags_take_uppercase(self):
     token = flags()
     actual = token.parseString("!TAKE")
     self.assertEqual(len(actual), 1)
     self.assertEqual(actual[0], "!take")
Ejemplo n.º 45
0
def flags_only():
    return StringStart() + flags() + StringEnd()
Ejemplo n.º 46
0
 def test_flags_unknown_token(self):
     token = flags()
     with self.assertRaises(ParseException):
         actual = token.parseString("!shoop")
Ejemplo n.º 47
0
def test_flags_adv():
    token = flags()
    actual = token.parseString("!adv")
    assert len(actual) == 1
    assert actual[0] == "!adv"
Ejemplo n.º 48
0
 def test_flags_adv(self):
     token = flags()
     actual = token.parseString("!adv")
     self.assertEqual(len(actual), 1)
     self.assertEqual(actual[0], "!adv")
Ejemplo n.º 49
0
def test_flags_advantage_uppercase():
    token = flags()
    actual = token.parseString("!ADVANTAGE")
    assert len(actual) == 1
    assert actual[0] == "!advantage"
Ejemplo n.º 50
0
 def test_flags_advantage_mixed_case(self):
     token = flags()
     actual = token.parseString("!aDvAnTaGe")
     self.assertEqual(len(actual), 1)
     self.assertEqual(actual[0], "!advantage")
Ejemplo n.º 51
0
def test_flags_dis_uppercase():
    token = flags()
    actual = token.parseString("!DIS")
    assert len(actual) == 1
    assert actual[0] == "!dis"
Ejemplo n.º 52
0
def test_flags_disadvantage():
    token = flags()
    actual = token.parseString("!disadvantage")
    assert len(actual) == 1
    assert actual[0] == "!disadvantage"