mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
manager: fixes for windows: use shutil.move instead of os.rename to allow move to
existing file tests: reset workdir before deleting temp dir
This commit is contained in:
parent
3f084625b0
commit
73f24f5a2b
@ -145,7 +145,8 @@ directory structure expected by pywb
|
||||
merged.write(line)
|
||||
last_line = line
|
||||
|
||||
os.rename(merged_file, cdx_file)
|
||||
shutil.move(merged_file, cdx_file)
|
||||
#os.rename(merged_file, cdx_file)
|
||||
os.remove(temp_file)
|
||||
|
||||
def set_metadata(self, namevalue_pairs):
|
||||
|
@ -37,12 +37,12 @@ def setup_module():
|
||||
root_dir = os.getcwd()
|
||||
|
||||
def teardown_module():
|
||||
global root_dir
|
||||
shutil.rmtree(root_dir)
|
||||
|
||||
global orig_cwd
|
||||
os.chdir(orig_cwd)
|
||||
|
||||
global root_dir
|
||||
shutil.rmtree(root_dir)
|
||||
|
||||
|
||||
#=============================================================================
|
||||
class TestManagedColls(object):
|
||||
|
Loading…
x
Reference in New Issue
Block a user