diff --git a/discordHelperWin.py b/discordHelperWin.py index efea6ef..b764c30 100644 --- a/discordHelperWin.py +++ b/discordHelperWin.py @@ -14,6 +14,6 @@ from modules import spidey_test, test_template if __name__ == "__main__": argv = sys.argv[1:] if len(argv) == 0: - argv = f"--all --launch --continue --gen-data new{int(time.time())}.yaml".split(" ") + argv = f"--all --launch --continue --gen-data new_test_data_{int(time.time())}.yaml".split(" ") args = discordHelper.argument_parser.parse(argv) discordHelper.main(args) diff --git a/modules/agnostic_paths.py b/modules/agnostic_paths.py index f1f92d0..d618dee 100644 --- a/modules/agnostic_paths.py +++ b/modules/agnostic_paths.py @@ -58,7 +58,13 @@ class AgnosticPaths: if self.force_path is not None: return self.force_path if self.os == 'windows': - return os.path.join(os.path.expanduser('~'), "AppData", "Local", f"Discord{self.ptb}") + base_path = os.path.join(os.path.expanduser('~'), "AppData", "Local", f"Discord") + if self.ptb == 'PTB': + return base_path+"PTB" + else: + if os.path.exists(base_path): + return base_path + return base_path+"PTB" # Try to find the PTB version elif self.os == 'linux': return os.path.join("/", "opt", "discord") # return os.path.join("usr","share","discord") diff --git a/modules/main_runner.py b/modules/main_runner.py index 3e85243..ac81767 100644 --- a/modules/main_runner.py +++ b/modules/main_runner.py @@ -14,7 +14,7 @@ argparse argument : [module_name, class_name] """ _TEST_MODULES = { "spidey": ["spidey_test", "SpideyTest"], - "test_walk": ["test_template", "TestWalkTemplate"], + # "test_walk": ["test_template", "TestWalkTemplate"], } PROGRAM_VERSION = "1.0.0" @@ -82,14 +82,13 @@ class TestRunner: """ self.list_of_tests = [] for module_name, test_class in self.loaded_test_classes.items(): - for i in range(10): - print(f"Starting test {module_name}") - tc = test_class(self.args, self.agnostic_path, None, self.finished_tests, queue_lock) - tc = threading.Thread(target=tc.run_test, args=()) - tc.name = str(module_name) - tc.daemon = True - self.list_of_tests.append(tc) - tc.start() + print(f"Starting test {module_name}") + tc = test_class(self.args, self.agnostic_path, None, self.finished_tests, queue_lock) + tc = threading.Thread(target=tc.run_test, args=()) + tc.name = str(module_name) + tc.daemon = True + self.list_of_tests.append(tc) + tc.start() # Launch a controller to allow the user to stop all tests # controller = threading.Thread(target=self.test_launcher) @@ -214,6 +213,7 @@ class TestRunner: queue_lock.release() return data + def export_data(test_runner, data): """ Exports the test data diff --git a/modules/spidey_test.py b/modules/spidey_test.py index 1238efc..74e56b5 100644 --- a/modules/spidey_test.py +++ b/modules/spidey_test.py @@ -10,15 +10,6 @@ class SpideyTest(test_template.TestTemplate): """ super().__init__(args, agnpath, test_data, queue, queue_lock) - def slowdown(self): - """ - This function is only used for testing. - :return: - """ - print("Spidey test is running slowly...") - import random, time - time.sleep(random.randint(1, 5)) - def run_test(self): """ Counts the number of lines in both index.js files. If it's more than one, it's almost certain your discord @@ -27,7 +18,7 @@ class SpideyTest(test_template.TestTemplate): :rtype: bool """ self.set_status("running") - self.slowdown() # This function is only used for testing + # self.slowdown() # This function is only used for testing paths = self.get_path() self.is_infected = False lines = 0