fix for deleting a non-blend file

This commit is contained in:
2014-11-20 21:08:13 +01:00
parent 29f1c3778e
commit b6154953ad
3 changed files with 14 additions and 6 deletions

View File

@@ -365,6 +365,7 @@ def global_setup():
def global_teardown(data):
p = data
p.terminate()
shutil.rmtree(TEMP_SERVER, ignore_errors=True)
shutil.rmtree(TEMP, ignore_errors=True)
@@ -620,6 +621,10 @@ class BamDeleteTest(BamSessionTestCase):
# remove the path
shutil.rmtree(session_path)
del session_path
# -----------
# New Session
# checkout the file again
stdout, stderr = bam_run(["checkout", "testfile.blend"], proj_path)
@@ -627,13 +632,13 @@ class BamDeleteTest(BamSessionTestCase):
# now delete the file we just checked out
new_session_path = os.path.join(proj_path, "testfile")
os.remove(os.path.join(new_session_path, "testfile.blend"))
stdout, stderr = bam_run(["commit", "-m", "test deletion"], new_session_path)
session_path = os.path.join(proj_path, "testfile")
os.remove(os.path.join(session_path, "testfile.blend"))
stdout, stderr = bam_run(["commit", "-m", "test deletion"], session_path)
self.assertEqual("", stderr)
# check if deletion of the file has happened
stdout, stderr = bam_run(["ls", "--json"], new_session_path)
stdout, stderr = bam_run(["ls", "--json"], session_path)
# check for errors in the response
self.assertEqual("", stderr)