The directory state tree currently relies on some static members that need to be reset when rerunning the test.

This commit is contained in:
A.J. Beamon 2018-05-23 12:19:21 -07:00
parent addb822b91
commit 1a39cd4a81
2 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,12 @@ class DirectoryStateTreeNode:
# Used for debugging
dir_id = 0
@classmethod
def reset(cls):
cls.dir_id = 0
cls.layers = {}
cls.default_directory = None
@classmethod
def set_default_directory(cls, default_directory):
cls.default_directory = default_directory

View File

@ -37,6 +37,7 @@ DIRECTORY_ERROR_STRING = 'DIRECTORY_ERROR'
def setup_directories(instructions, default_path, random):
# Clients start with the default directory layer in the directory list
DirectoryStateTreeNode.reset()
dir_list = [DirectoryStateTreeNode.get_layer('\xfe')]
instructions.push_args(0, '\xfe')