def test_time_all(self): """ Check the time in "all" cities. Must include something that matches the time pattern on each line """ res = commands.googletime(c, e, "#test", "testrunner", "all") res = list(res) assert res for line in res: assert self.multi_time_pattern.match(line) assert len(res) == 4
def test_time_one(self): """ Check the time in Washington, DC. Must match time_pattern. """ res = commands.googletime(c, e, "#test", "testrunner", "Washington, DC") res = list(res) assert res for line in res: assert self.single_time_pattern.match(line) assert len(res) == 1
def test_time_three(self): """ Check the time in three cities. Must include something that matches the time pattern on each line """ res = commands.googletime(c, e, "#test", "testrunner", "Washington, DC | Palo Alto, CA | London") res = list(res) assert res for line in res: assert self.multi_time_pattern.match(line) assert len(res) == 3