created shared file for some test fucntions
This commit is contained in:
@ -8,10 +8,11 @@ from multiprocessing import Pipe
|
||||
from core.correctness.vars import FILE_CREATE_EVENT, BAREBONES_NOTEBOOK, \
|
||||
TEST_MONITOR_BASE, EVENT_TYPE, WATCHDOG_RULE, WATCHDOG_BASE, \
|
||||
WATCHDOG_TYPE, EVENT_PATH
|
||||
from core.functionality import rmtree, make_dir
|
||||
from core.functionality import make_dir
|
||||
from patterns.file_event_pattern import FileEventPattern, WatchdogMonitor, \
|
||||
_DEFAULT_MASK, SWEEP_START, SWEEP_STOP, SWEEP_JUMP
|
||||
from recipes import JupyterNotebookRecipe
|
||||
from shared import setup, teardown
|
||||
|
||||
|
||||
def patterns_equal(tester, pattern_one, pattern_two):
|
||||
@ -38,11 +39,11 @@ def recipes_equal(tester, recipe_one, recipe_two):
|
||||
class CorrectnessTests(unittest.TestCase):
|
||||
def setUp(self)->None:
|
||||
super().setUp()
|
||||
make_dir(TEST_MONITOR_BASE, ensure_clean=True)
|
||||
setup()
|
||||
|
||||
def tearDown(self)->None:
|
||||
super().tearDown()
|
||||
rmtree(TEST_MONITOR_BASE)
|
||||
teardown()
|
||||
|
||||
def testFileEventPatternCreationMinimum(self)->None:
|
||||
FileEventPattern("name", "path", "recipe", "file")
|
||||
|
Reference in New Issue
Block a user