def test_10_interpreter_run_command_validate_code(self): args = 'commandline validate -i linkedlistnode.py' args = args.split(' ') interpreter = com_int.Interpreter(args) expected = False actual = interpreter.run_command() self.assertEqual(expected, actual)
def test_06_interpreter_run_command_csv_to_uml(self): args = 'commandline csv-uml -i plants.csv' args = args.split(' ') interpreter = com_int.Interpreter(args) expected = True actual = interpreter.run_command() self.assertEqual(expected, actual)
def test_08_interpreter_run_command_pickle_uml(self): args = 'commandline pickle-uml -i plants.py' args = args.split(' ') interpreter = com_int.Interpreter(args) expected = True actual = interpreter.run_command() self.assertEqual(expected, actual)
def test_05_interpreter_run_command_to_csv(self): args = 'commandline to-csv -i plants.py -o plants.csv' args = args.split(' ') interpreter = com_int.Interpreter(args) expected = True actual = interpreter.run_command() self.assertEqual(expected, actual)
def test_12_interpreter_run_command_help(self): args = 'commandline help' args = args.split(' ') interpreter = com_int.Interpreter(args) expected = False actual = interpreter.help('notrealfile.txt') self.assertEqual(expected, actual)
def test_11_interpreter_run_command_help(self): args = 'commandline help' args = args.split(' ') interpreter = com_int.Interpreter(args) expected = True actual = interpreter.run_command() self.assertEqual(expected, actual)
def test_01_interpreter_construct(self): interpreter = com_int.Interpreter('-i plants.py -o plants.csv') expected = True if type(interpreter) is com_int.Interpreter: actual = True else: actual = False self.assertEqual(expected, actual)
def test_03_interpreter_check_command_line(self): args = '-i plants.py -o plants.csv' args = args.split(' ') interpreter = com_int.Interpreter(args) interpreter.check_command_line(args) expected = 'plants.csv' actual = interpreter.output_file self.assertEqual(expected, actual)
def test_34_command_interpreter_help(self): command_line = com_int.Interpreter('help') expected = False actual = command_line.help('false_file.txt') self.assertEqual(expected, actual)
def test_34_command_interpreter_help(self): command_line = com_int.Interpreter('help') expected = True actual = command_line.help() self.assertEqual(expected, actual)