File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,6 +176,9 @@ def test_cli(
176176
177177 result : Result
178178
179+ st = (tmp_pathplus / "code.py" ).stat ()
180+ assert st == st
181+
179182 with in_directory (tmp_pathplus ):
180183 runner = CliRunner (mix_stderr = False )
181184 result = runner .invoke (
@@ -189,13 +192,22 @@ def test_cli(
189192
190193 check_out (result , advanced_data_regression )
191194
195+ # mtime should have changed
196+ new_st = (tmp_pathplus / "code.py" ).stat ()
197+ assert new_st .st_mtime != st .st_mtime
198+ assert new_st != st
199+
192200 # Calling a second time shouldn't change anything
193201 with in_directory (tmp_pathplus ):
194202 runner = CliRunner (mix_stderr = False )
195203 result = runner .invoke (main , args = ["code.py" ])
196204
197205 assert result .exit_code == 0
198206
207+ # mtime should be the same
208+ assert (tmp_pathplus / "code.py" ).stat ().st_mtime == new_st .st_mtime
209+ assert (tmp_pathplus / "code.py" ).stat () == new_st
210+
199211
200212def test_cli_verbose_verbose (
201213 tmp_pathplus : PathPlus ,
You can’t perform that action at this time.
0 commit comments