Test script to test our application works correctly and to catch bugs.
class DummyArgs:
def __init__(self, path, verbose=False):
self.cmd_file_path = path
self.verbose = verbose
Now, we are good to create test cases.
args = DummyArgs('./examples/example1.txt')
test_stdout(run, args, '4,5,WEST')
args = DummyArgs('./examples/example2.txt')
test_stdout(run, args, '0,1,NORTH')
args = DummyArgs('./examples/example3.txt')
test_stdout(run, args, '0,0,WEST')
args = DummyArgs('./examples/example4.txt')
test_stdout(run, args, '3,3,NORTH')
args = DummyArgs('./examples/example5.txt')
test_stdout(run, args, '5,5,EAST')
args = DummyArgs('./examples/example6.txt')
test_stdout(run, args, '2,3,NORTH')
args = DummyArgs('./examples/example7.txt')
test_stdout(run, args, '5,5,NORTH')
args = DummyArgs('./examples/example8.txt')
test_stdout(run, args, '1,1,EAST')
args = DummyArgs('./examples/example9.txt')
test_stdout(run, args, '3,2,EAST')
from nbdev.export import *
notebook2script()