1
0
mirror of https://github.com/venthur/blag.git synced 2025-11-25 20:52:43 +00:00

replaced args with cleandir where possible, removed tempdir

This commit is contained in:
Bastian Venthur
2021-03-29 13:17:40 +02:00
parent 499b0dfe11
commit 9cdecdccf7
4 changed files with 28 additions and 28 deletions

View File

@@ -3,19 +3,19 @@ import time
from blag import devserver
def test_get_last_modified(tempdir):
def test_get_last_modified(cleandir):
# take initial time
t1 = devserver.get_last_modified([tempdir])
t1 = devserver.get_last_modified(['content'])
# wait a bit, create a file and measure again
time.sleep(0.1)
with open(f'{tempdir}/test', 'w') as fh:
with open('content/test', 'w') as fh:
fh.write('boo')
t2 = devserver.get_last_modified([tempdir])
t2 = devserver.get_last_modified(['content'])
# wait a bit and take time again
time.sleep(0.1)
t3 = devserver.get_last_modified([tempdir])
t3 = devserver.get_last_modified(['content'])
assert t2 > t1
assert t2 == t3