From ce140e8155381af5d13d84e2940025fc1bdb001c Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Thu, 20 Jul 2023 21:50:18 +0100 Subject: [PATCH] Introduce artificial delay into ``test_gettext_dont_rebuild_mo`` --- tests/test_intl.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_intl.py b/tests/test_intl.py index 54fa113c183..b34ce5e331a 100644 --- a/tests/test_intl.py +++ b/tests/test_intl.py @@ -5,6 +5,7 @@ import os import re +import time import pygments import pytest @@ -629,6 +630,7 @@ def get_number_of_update_targets(app_): # phase1: build document with non-gettext builder and generate mo file in srcdir app0 = make_app('dummy', *args, **kwargs) app0.build() + time.sleep(0.01) assert (app0.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').exists() # Since it is after the build, the number of documents to be updated is 0 assert get_number_of_update_targets(app0) == 0 @@ -646,6 +648,7 @@ def get_number_of_update_targets(app_): # The mo file in the srcdir directory is retained. app = make_app('gettext', *args, **kwargs) app.build() + time.sleep(0.01) # Since it is after the build, the number of documents to be updated is 0 assert get_number_of_update_targets(app) == 0 # Even if the timestamp of the mo file is updated, the number of documents