def defaults_to_sys_argv(self, mock_sys): argv = ["inv", "--version"] mock_sys.argv = argv p = Program() p.print_version = Mock() p.run(exit=False) p.print_version.assert_called()
def defaults_to_sys_argv(self, mock_sys): argv = ['inv', '--version'] mock_sys.argv = argv p = Program() p.print_version = Mock() p.run(exit=False) p.print_version.assert_called()
def splits_a_string(self): p = Program() p.print_version = Mock() p.run("inv --version", exit=False) p.print_version.assert_called()
def uses_a_list_unaltered(self): p = Program() p.print_version = Mock() p.run(["inv", "--version"], exit=False) p.print_version.assert_called()
def uses_a_list_unaltered(self): p = Program() p.print_version = Mock() p.run(['inv', '--version'], exit=False) p.print_version.assert_called()