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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user