Skip to content

Commit ce140e8

Browse files
committed
Introduce artificial delay into test_gettext_dont_rebuild_mo
1 parent 13720de commit ce140e8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_intl.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import os
77
import re
8+
import time
89

910
import pygments
1011
import pytest
@@ -629,6 +630,7 @@ def get_number_of_update_targets(app_):
629630
# phase1: build document with non-gettext builder and generate mo file in srcdir
630631
app0 = make_app('dummy', *args, **kwargs)
631632
app0.build()
633+
time.sleep(0.01)
632634
assert (app0.srcdir / 'xx' / 'LC_MESSAGES' / 'bom.mo').exists()
633635
# Since it is after the build, the number of documents to be updated is 0
634636
assert get_number_of_update_targets(app0) == 0
@@ -646,6 +648,7 @@ def get_number_of_update_targets(app_):
646648
# The mo file in the srcdir directory is retained.
647649
app = make_app('gettext', *args, **kwargs)
648650
app.build()
651+
time.sleep(0.01)
649652
# Since it is after the build, the number of documents to be updated is 0
650653
assert get_number_of_update_targets(app) == 0
651654
# Even if the timestamp of the mo file is updated, the number of documents

0 commit comments

Comments
 (0)