def test_pick_or(self): """ Test the pick command with a simple or expression """ res = commands.pick("fire or acid") assert logical_xor("fire" in res, "acid" in res) assert " or " not in res
def test_pick_or_intro(self): """ Test the pick command with an intro and a simple "or" expression """ res = commands.pick("how would you like to die, pmxbot: fire or acid") assert logical_xor("fire" in res, "acid" in res) assert "die" not in res and "pmxbot" not in res and " or " not in res
def test_pick_comma_intro(self): """ Test the pick command with an intro followed by two options separted by commas """ res = commands.pick("how would you like to die, pmxbot: fire, acid") assert logical_xor("fire" in res, "acid" in res) assert "die" not in res and "pmxbot" not in res
def test_pick_comma_or_intro(self): """ Test the pick command with an intro followed by options with commas and ors """ msg = "how would you like to die, pmxbot: gun, fire, acid or defenestration" res = commands.pick(msg) assert onetrue("gun" in res, "fire" in res, "acid" in res, "defenestration" in res) assert "die" not in res and "pmxbot" not in res and " or " not in res
def test_pick_comma(self): """ Test the pick command with two options separated by commas """ res = commands.pick("fire, acid") assert logical_xor("fire" in res, "acid" in res)