@@ -316,7 +316,7 @@ $ {python} -c "print('x=1')" >foo.py
316316$ {python} -c "print('x=1')" >bar.py
317317$ mypy --local-partial-types --cache-fine-grained --follow-imports=error --no-sqlite-cache --python-version=3.11 -- foo.py bar.py
318318Success: no issues found in 2 source files
319- $ {python} -c "import shutil; shutil.copy('.mypy_cache/3.11/bar.meta.json ', 'asdf.json ')"
319+ $ {python} -c "import shutil; shutil.copy('.mypy_cache/3.11/bar.meta.ff ', 'asdf.ff ')"
320320-- update bar's timestamp but don't change the file
321321$ {python} -c "import time;time.sleep(1)"
322322$ {python} -c "print('x=1')" >bar.py
@@ -328,7 +328,7 @@ Daemon is up and running
328328$ dmypy stop
329329Daemon stopped
330330-- copy the original bar cache file back so that the mtime mismatches
331- $ {python} -c "import shutil; shutil.copy('asdf.json ', '.mypy_cache/3.11/bar.meta.json ')"
331+ $ {python} -c "import shutil; shutil.copy('asdf.ff ', '.mypy_cache/3.11/bar.meta.ff ')"
332332-- sleep guarantees timestamp changes
333333$ {python} -c "import time;time.sleep(1)"
334334$ {python} -c "print('lol')" >foo.py
@@ -341,7 +341,7 @@ Found 1 error in 1 file (checked 2 source files)
341341$ {python} -c "import sys; sys.stdout.write(open('log').read())"
342342-- make sure the meta file didn't get updated. we use this as an imperfect proxy for
343343-- whether the source file got rehashed, which we don't want it to have been.
344- $ {python} -c "x = open('.mypy_cache/3.11/bar.meta.json' ).read(); y = open('asdf.json ').read(); assert x == y"
344+ $ {python} -c "x = open('.mypy_cache/3.11/bar.meta.ff', 'rb' ).read(); y = open('asdf.ff', 'rb ').read(); assert x == y"
345345
346346[case testDaemonSuggest]
347347$ dmypy start --log-file log.txt -- --follow-imports=error --no-error-summary
0 commit comments