Skip to content
Snippets Groups Projects
Commit ed7f876f authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Clean up a test

parent ef4c8943
No related branches found
No related tags found
No related merge requests found
......@@ -14,17 +14,19 @@ class TestGetSessionObject(unittest.TestCase):
self.assertTrue(exists(sesh.session_log), 'Session did not create a log file in the correct place')
self.assertTrue(exists(sesh.manifest_json), 'Session did not create a manifest JSON file in the correct place')
def test_can_change_session_root(self):
def test_changing_session_root_creates_new_directory(self):
from conf.defaults import root
from shutil import rmtree
sesh = Session()
old_paths = sesh.get_paths()
newroot = root / 'subdir'
sesh.restart(root=newroot)
new_paths = sesh.get_paths()
for k in old_paths.keys():
self.assertTrue(new_paths[k].__str__().startswith(newroot.__str__()))
rmtree(newroot)
self.assertFalse(newroot.exists(), 'Could not clean up temporary test subdirectory')
def test_restart_session(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment