My team is trying to upgrade from 0.3.0.post1 to 0.4.2. With that being the only change, some of tests start to fail with time related issues. I probably can't share too much of the code, but the interesting characteristics are that the mark is added to the class and there is a fixture within the class that the failing test uses. Here's the start fo the test case:
@pytest.mark.freeze_time("2020-04-01")
class TestMDProviderAvailability:
@pytest.fixture()
def scheduled_provider(self):
now = timezone.now()
shift_start = datetime(
year=now.year, month=now.month, day=now.day, hour=8, minute=0, microsecond=0, tzinfo=timezone.utc
)
return ScheduledDoctorFactory(shift=shift_start)
We have also noticed the same problem on 0.4.1 so this behavior is not new 0.4.2. Could there be some issue with the freeze_time mark not applying to the nest fixture or something? Any thoughts about what might be going on? I can try to provide more data if this isn't enough to go on.
My team is trying to upgrade from 0.3.0.post1 to 0.4.2. With that being the only change, some of tests start to fail with time related issues. I probably can't share too much of the code, but the interesting characteristics are that the mark is added to the class and there is a fixture within the class that the failing test uses. Here's the start fo the test case:
We have also noticed the same problem on 0.4.1 so this behavior is not new 0.4.2. Could there be some issue with the
freeze_timemark not applying to the nest fixture or something? Any thoughts about what might be going on? I can try to provide more data if this isn't enough to go on.