Beispiel #1
0
 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()
Beispiel #2
0
 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()
Beispiel #3
0
 def splits_a_string(self):
     p = Program()
     p.print_version = Mock()
     p.run("inv --version", exit=False)
     p.print_version.assert_called()
Beispiel #4
0
 def uses_a_list_unaltered(self):
     p = Program()
     p.print_version = Mock()
     p.run(["inv", "--version"], exit=False)
     p.print_version.assert_called()
Beispiel #5
0
 def uses_a_list_unaltered(self):
     p = Program()
     p.print_version = Mock()
     p.run(['inv', '--version'], exit=False)
     p.print_version.assert_called()
Beispiel #6
0
 def splits_a_string(self):
     p = Program()
     p.print_version = Mock()
     p.run("inv --version", exit=False)
     p.print_version.assert_called()