some cleanup of unneeded imports and other small cleanups

This commit is contained in:
PatchOfScotland
2023-01-13 18:15:15 +01:00
parent d9004394c1
commit 2cd92c04fa
7 changed files with 16 additions and 72 deletions

View File

@ -6,14 +6,10 @@ from multiprocessing import Pipe, Queue
from time import sleep
from core.correctness.vars import CHAR_LOWERCASE, CHAR_UPPERCASE, \
BAREBONES_NOTEBOOK, SHA256, TEST_MONITOR_BASE, COMPLETE_NOTEBOOK, \
EVENT_TYPE
SHA256, TEST_MONITOR_BASE, COMPLETE_NOTEBOOK, EVENT_TYPE
from core.functionality import generate_id, wait, get_file_hash, rmtree, \
make_dir, parameterize_jupyter_notebook, create_event
from core.meow import BaseRule
from patterns.file_event_pattern import FileEventPattern
from recipes.jupyter_notebook_recipe import JupyterNotebookRecipe
class CorrectnessTests(unittest.TestCase):
def setUp(self) -> None:

View File

@ -2,8 +2,7 @@
import io
import os
import unittest
from multiprocessing import Pipe
from time import sleep
from typing import Any
@ -175,8 +174,6 @@ class MeowTests(unittest.TestCase):
FullTestHandler()
def testMeowRunner(self)->None:
#monitor_to_handler_reader, monitor_to_handler_writer = Pipe()
pattern_one = FileEventPattern(
"pattern_one", "start/A.txt", "recipe_one", "infile",
parameters={
@ -260,8 +257,6 @@ class MeowTests(unittest.TestCase):
self.assertEqual(data, "Initial Data\nA line from a test Pattern")
def testMeowRunnerLinkeExecution(self)->None:
#monitor_to_handler_reader, monitor_to_handler_writer = Pipe()
pattern_one = FileEventPattern(
"pattern_one", "start/A.txt", "recipe_one", "infile",
parameters={

View File

@ -4,9 +4,9 @@ import unittest
from multiprocessing import Pipe
from core.correctness.vars import FILE_EVENTS, FILE_CREATE_EVENT, \
BAREBONES_NOTEBOOK, TEST_MONITOR_BASE, EVENT_TYPE, WATCHDOG_RULE, \
WATCHDOG_BASE, WATCHDOG_SRC, WATCHDOG_TYPE
from core.correctness.vars import FILE_CREATE_EVENT, BAREBONES_NOTEBOOK, \
TEST_MONITOR_BASE, EVENT_TYPE, WATCHDOG_RULE, WATCHDOG_BASE, \
WATCHDOG_SRC, WATCHDOG_TYPE
from core.functionality import rmtree, make_dir
from core.meow import create_rules
from patterns.file_event_pattern import FileEventPattern, WatchdogMonitor, \
@ -171,7 +171,6 @@ class CorrectnessTests(unittest.TestCase):
self.assertEqual(len(rules), 1)
rule = rules[list(rules.keys())[0]]
# TODO fix this test
wm.start()
open(os.path.join(TEST_MONITOR_BASE, "A"), "w")

View File

@ -4,9 +4,7 @@ import jsonschema
import os
import unittest
from multiprocessing import Pipe
from time import sleep
from watchdog.events import FileCreatedEvent
from patterns.file_event_pattern import FileEventPattern
from recipes.jupyter_notebook_recipe import JupyterNotebookRecipe, \