Added Pipeconnection for Windows and os.path.join, rather than hardcoded path combine
This commit is contained in:
@ -76,25 +76,38 @@ class CorrectnessTests(unittest.TestCase):
|
||||
pipe_one_writer.send(1)
|
||||
readables = wait(inputs)
|
||||
|
||||
# raise EnvironmentError
|
||||
|
||||
# if pipe_one_reader.poll(3):
|
||||
# print(pipe_one_reader.recv())
|
||||
|
||||
self.assertIn(pipe_one_reader, readables)
|
||||
print("assert1")
|
||||
self.assertEqual(len(readables), 1)
|
||||
print("assert2")
|
||||
msg = readables[0].recv()
|
||||
self.assertEqual(msg, 1)
|
||||
print("assert3")
|
||||
|
||||
pipe_one_writer.send(1)
|
||||
pipe_two_writer.send(2)
|
||||
readables = wait(inputs)
|
||||
|
||||
self.assertIn(pipe_one_reader, readables)
|
||||
print("assert4")
|
||||
self.assertIn(pipe_two_reader, readables)
|
||||
print("assert5")
|
||||
self.assertEqual(len(readables), 2)
|
||||
print("assert6")
|
||||
for readable in readables:
|
||||
if readable == pipe_one_reader:
|
||||
msg = readable.recv()
|
||||
self.assertEqual(msg, 1)
|
||||
print("assertloop if")
|
||||
elif readable == pipe_two_reader:
|
||||
msg = readable.recv()
|
||||
self.assertEqual(msg, 2)
|
||||
print("assert loop elif")
|
||||
|
||||
# Test that wait can wait on multiple queues
|
||||
def testWaitQueues(self)->None:
|
||||
|
@ -121,10 +121,10 @@ class MeowTests(unittest.TestCase):
|
||||
# Test single meow papermill job execution
|
||||
def testMeowRunnerPapermillExecution(self)->None:
|
||||
pattern_one = FileEventPattern(
|
||||
"pattern_one", "start/A.txt", "recipe_one", "infile",
|
||||
"pattern_one", os.path.join("start","A.txt"), "recipe_one", "infile",
|
||||
parameters={
|
||||
"extra":"A line from a test Pattern",
|
||||
"outfile":"{VGRID}/output/{FILENAME}"
|
||||
"outfile":os.path.join("{VGRID}","output","{FILENAME}")
|
||||
})
|
||||
recipe = JupyterNotebookRecipe(
|
||||
"recipe_one", APPENDING_NOTEBOOK)
|
||||
@ -205,16 +205,16 @@ class MeowTests(unittest.TestCase):
|
||||
# Test meow papermill job chaining within runner
|
||||
def testMeowRunnerLinkedPapermillExecution(self)->None:
|
||||
pattern_one = FileEventPattern(
|
||||
"pattern_one", "start/A.txt", "recipe_one", "infile",
|
||||
"pattern_one", os.path.join("start","A.txt"), "recipe_one", "infile",
|
||||
parameters={
|
||||
"extra":"A line from Pattern 1",
|
||||
"outfile":"{VGRID}/middle/{FILENAME}"
|
||||
"outfile":os.path.join("{VGRID}","middle","{FILENAME}")
|
||||
})
|
||||
pattern_two = FileEventPattern(
|
||||
"pattern_two", "middle/A.txt", "recipe_one", "infile",
|
||||
"pattern_two", os.path.join("middle","A.txt"), "recipe_one", "infile",
|
||||
parameters={
|
||||
"extra":"A line from Pattern 2",
|
||||
"outfile":"{VGRID}/output/{FILENAME}"
|
||||
"outfile":os.path.join("{VGRID}","output","{FILENAME}")
|
||||
})
|
||||
recipe = JupyterNotebookRecipe(
|
||||
"recipe_one", APPENDING_NOTEBOOK)
|
||||
@ -314,10 +314,10 @@ class MeowTests(unittest.TestCase):
|
||||
# Test single meow python job execution
|
||||
def testMeowRunnerPythonExecution(self)->None:
|
||||
pattern_one = FileEventPattern(
|
||||
"pattern_one", "start/A.txt", "recipe_one", "infile",
|
||||
"pattern_one", os.path.join("start","A.txt"), "recipe_one", "infile",
|
||||
parameters={
|
||||
"num":10000,
|
||||
"outfile":"{VGRID}/output/{FILENAME}"
|
||||
"outfile":os.path.join("{VGRID}","output","{FILENAME}")
|
||||
})
|
||||
recipe = PythonRecipe(
|
||||
"recipe_one", COMPLETE_PYTHON_SCRIPT
|
||||
@ -403,16 +403,16 @@ class MeowTests(unittest.TestCase):
|
||||
# Test meow python job chaining within runner
|
||||
def testMeowRunnerLinkedPythonExecution(self)->None:
|
||||
pattern_one = FileEventPattern(
|
||||
"pattern_one", "start/A.txt", "recipe_one", "infile",
|
||||
"pattern_one", os.path.join("start","A.txt"), "recipe_one", "infile",
|
||||
parameters={
|
||||
"num":250,
|
||||
"outfile":"{VGRID}/middle/{FILENAME}"
|
||||
"outfile":os.path.join("{VGRID}","middle","{FILENAME}")
|
||||
})
|
||||
pattern_two = FileEventPattern(
|
||||
"pattern_two", "middle/A.txt", "recipe_one", "infile",
|
||||
"pattern_two", os.path.join("middle","A.txt"), "recipe_one", "infile",
|
||||
parameters={
|
||||
"num":40,
|
||||
"outfile":"{VGRID}/output/{FILENAME}"
|
||||
"outfile":os.path.join("{VGRID}","output","{FILENAME}")
|
||||
})
|
||||
recipe = PythonRecipe(
|
||||
"recipe_one", COMPLETE_PYTHON_SCRIPT
|
||||
|
Reference in New Issue
Block a user