added cvery brief descriptions to tests
This commit is contained in:
@@ -16,12 +16,14 @@ class CorrectnessTests(unittest.TestCase):
|
||||
super().tearDown()
|
||||
teardown()
|
||||
|
||||
# Test FileEventJupyterNotebookRule created from valid pattern and recipe
|
||||
def testFileEventJupyterNotebookRuleCreationMinimum(self)->None:
|
||||
fep = FileEventPattern("name", "path", "recipe", "file")
|
||||
jnr = JupyterNotebookRecipe("recipe", BAREBONES_NOTEBOOK)
|
||||
|
||||
FileEventJupyterNotebookRule("name", fep, jnr)
|
||||
|
||||
# Test FileEventJupyterNotebookRule not created with empty name
|
||||
def testFileEventJupyterNotebookRuleCreationNoName(self)->None:
|
||||
fep = FileEventPattern("name", "path", "recipe", "file")
|
||||
jnr = JupyterNotebookRecipe("recipe", BAREBONES_NOTEBOOK)
|
||||
@@ -29,6 +31,7 @@ class CorrectnessTests(unittest.TestCase):
|
||||
with self.assertRaises(ValueError):
|
||||
FileEventJupyterNotebookRule("", fep, jnr)
|
||||
|
||||
# Test FileEventJupyterNotebookRule not created with invalid name
|
||||
def testFileEventJupyterNotebookRuleCreationInvalidName(self)->None:
|
||||
fep = FileEventPattern("name", "path", "recipe", "file")
|
||||
jnr = JupyterNotebookRecipe("recipe", BAREBONES_NOTEBOOK)
|
||||
@@ -36,18 +39,21 @@ class CorrectnessTests(unittest.TestCase):
|
||||
with self.assertRaises(TypeError):
|
||||
FileEventJupyterNotebookRule(1, fep, jnr)
|
||||
|
||||
# Test FileEventJupyterNotebookRule not created with invalid pattern
|
||||
def testFileEventJupyterNotebookRuleCreationInvalidPattern(self)->None:
|
||||
jnr = JupyterNotebookRecipe("recipe", BAREBONES_NOTEBOOK)
|
||||
|
||||
with self.assertRaises(TypeError):
|
||||
FileEventJupyterNotebookRule("name", "pattern", jnr)
|
||||
|
||||
# Test FileEventJupyterNotebookRule not created with invalid recipe
|
||||
def testFileEventJupyterNotebookRuleCreationInvalidRecipe(self)->None:
|
||||
fep = FileEventPattern("name", "path", "recipe", "file")
|
||||
|
||||
with self.assertRaises(TypeError):
|
||||
FileEventJupyterNotebookRule("name", fep, "recipe")
|
||||
|
||||
# Test FileEventJupyterNotebookRule not created with mismatched recipe
|
||||
def testFileEventJupyterNotebookRuleCreationMissmatchedRecipe(self)->None:
|
||||
fep = FileEventPattern("name", "path", "recipe", "file")
|
||||
jnr = JupyterNotebookRecipe("test_recipe", BAREBONES_NOTEBOOK)
|
||||
@@ -55,6 +61,7 @@ class CorrectnessTests(unittest.TestCase):
|
||||
with self.assertRaises(ValueError):
|
||||
FileEventJupyterNotebookRule("name", fep, jnr)
|
||||
|
||||
# Test FileEventJupyterNotebookRule created with valid name
|
||||
def testFileEventJupyterNotebookRuleSetupName(self)->None:
|
||||
name = "name"
|
||||
fep = FileEventPattern("name", "path", "recipe", "file")
|
||||
@@ -64,6 +71,7 @@ class CorrectnessTests(unittest.TestCase):
|
||||
|
||||
self.assertEqual(fejnr.name, name)
|
||||
|
||||
# Test FileEventJupyterNotebookRule not created with valid pattern
|
||||
def testFileEventJupyterNotebookRuleSetupPattern(self)->None:
|
||||
fep = FileEventPattern("name", "path", "recipe", "file")
|
||||
jnr = JupyterNotebookRecipe("recipe", BAREBONES_NOTEBOOK)
|
||||
@@ -72,6 +80,7 @@ class CorrectnessTests(unittest.TestCase):
|
||||
|
||||
self.assertEqual(fejnr.pattern, fep)
|
||||
|
||||
# Test FileEventJupyterNotebookRule not created with valid recipe
|
||||
def testFileEventJupyterNotebookRuleSetupRecipe(self)->None:
|
||||
fep = FileEventPattern("name", "path", "recipe", "file")
|
||||
jnr = JupyterNotebookRecipe("recipe", BAREBONES_NOTEBOOK)
|
||||
|
||||
Reference in New Issue
Block a user