Exemplo n.º 1
0
    def test_cache_loads_faster_second_time(self):
        start_time_1 = time()
        Calendar.load_cache("bacs")
        duration_1 = time() - start_time_1

        start_time_2 = time()
        Calendar.load_cache("bacs")
        duration_2 = time() - start_time_2

        assert duration_2 < duration_1
Exemplo n.º 2
0
 def test_when_given_a_valid_calendar(self):
     calendar = Calendar.load_cache("weekdays")
     assert isinstance(calendar, Calendar)