def test_copy_config_options__empty(self):
     """
     An error should result from --copy-config-options with no options.
     """
     with self.assertRaises(SystemExit):
         handle_args(["/dev/null",
                      "/dev/null",
                      "haitian5-bundle",
                      "--copy-config-options"])
Beispiel #2
0
 def test_copy_config_options__empty(self):
     """
     An error should result from --copy-config-options with no options.
     """
     with self.assertRaises(SystemExit):
         handle_args([
             "/dev/null", "/dev/null", "haitian5-bundle",
             "--copy-config-options"
         ])
Beispiel #3
0
 def test_copy_config_options(self):
     """
     For --copy_config_options, Space-separated options surrounded by a pair
     of quotes should not be split.
     """
     args = handle_args([
         "/dev/null", "/dev/null", "haitian5-bundle",
         "--copy-config-options", "-grammar grammar.gz"
     ])
     self.assertIsInstance(args.config, file)
     self.assertEqual("-grammar grammar.gz", args.copy_config_options)
 def test_copy_config_options(self):
     """
     For --copy_config_options, Space-separated options surrounded by a pair
     of quotes should not be split.
     """
     args = handle_args(["/dev/null",
                         "/dev/null",
                         "haitian5-bundle",
                         "--copy-config-options",
                         "-grammar grammar.gz"])
     self.assertIsInstance(args.config, file)
     self.assertEqual("-grammar grammar.gz", args.copy_config_options)
 def test_no_force(self):
     args = handle_args(["/dev/null",
                         "/dev/null",
                         "haitian5-bundle"])
     self.assertIsInstance(args.config, file)
 def setUp(self):
     self.line = '# This is the location of the file containing model weights.'
     self.args = handle_args(['/dev/null', '/dev/null', '/dev/null'])
 def setUp(self):
     self.args = handle_args(['/dev/null', '/dev/null', '/dev/null'])
Beispiel #8
0
 def test_no_force(self):
     args = handle_args(["/dev/null", "/dev/null", "haitian5-bundle"])
     self.assertIsInstance(args.config, file)
Beispiel #9
0
 def setUp(self):
     self.line = '# This is the location of the file containing model weights.'
     self.args = handle_args(['/dev/null', '/dev/null', '/dev/null'])
Beispiel #10
0
 def setUp(self):
     self.args = handle_args(['/dev/null', '/dev/null', '/dev/null'])