Exemplo n.º 1
0
 def test_configfile_does_not_exist(self):
     with self.temporary_directory_context():
         with patch("os.path.expanduser", new=expanduser):
             from infi.projector.commandline_parser import append_default_arguments_from_configuration_files
             arguments = dict()
             append_default_arguments_from_configuration_files(arguments)
             self.assertEquals(arguments, dict())
Exemplo n.º 2
0
 def test_configfile_no_commanline_section(self):
     with self.temporary_directory_context():
         with open(".projector", 'w') as fd:
             fd.write("[invalid-section]\n")
         with patch("os.path.expanduser", new=expanduser):
             from infi.projector.commandline_parser import append_default_arguments_from_configuration_files
             arguments = dict()
             append_default_arguments_from_configuration_files(arguments)
             self.assertEquals(arguments, dict())
Exemplo n.º 3
0
 def test_configfile_some_commandline_arguments(self):
     with self.temporary_directory_context():
         with open(".projector", 'w') as fd:
             fd.write("[commandline-arguments]\n--use-isolated-python = True\n--pypi-servers=pypi,local\n")
         with patch("os.path.expanduser", new=expanduser):
             from infi.projector.commandline_parser import append_default_arguments_from_configuration_files
             arguments = dict()
             append_default_arguments_from_configuration_files(arguments)
             expected = {'--pypi-servers': 'pypi,local', '--use-isolated-python': True}
             self.assertEquals(arguments, expected)