File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -213,12 +213,13 @@ def test_long_path(sdist_long_path):
213
213
214
214
215
215
def test_reproducible (package_pure , tmp_path ):
216
- t1 = time .time ()
217
- sdist_path_a = mesonpy .build_sdist (tmp_path / 'a' )
218
- t2 = time .time ()
219
- # Ensure that the two sdists are build at least one second apart.
220
- time .sleep (max (t1 + 1.0 - t2 , 0.0 ))
221
- sdist_path_b = mesonpy .build_sdist (tmp_path / 'b' )
216
+ with in_git_repo_context ():
217
+ t1 = time .time ()
218
+ sdist_path_a = mesonpy .build_sdist (tmp_path / 'a' )
219
+ t2 = time .time ()
220
+ # Ensure that the two sdists are build at least one second apart.
221
+ time .sleep (max (t1 + 1.0 - t2 , 0.0 ))
222
+ sdist_path_b = mesonpy .build_sdist (tmp_path / 'b' )
222
223
223
224
assert sdist_path_a == sdist_path_b
224
225
assert tmp_path .joinpath ('a' , sdist_path_a ).read_bytes () == tmp_path .joinpath ('b' , sdist_path_b ).read_bytes ()
You can’t perform that action at this time.
0 commit comments