Exemple #1
0
    def test_invalid_param(self):
        with TempFile() as f:
            args = ['--in-format', 'none', f.name]
            self.assertNotEqual(_JubaModelCommand.start(args), 0)

            args = ['--out-format', 'none', f.name]
            self.assertNotEqual(_JubaModelCommand.start(args), 0)

            args = ['--no-such-option']
            self.assertNotEqual(_JubaModelCommand.start(args), 0)
Exemple #2
0
  def test_invalid_param(self):
    with TempFile() as f:
      args = ['--in-format', 'none', f.name]
      self.assertNotEqual(_JubaModelCommand.start(args), 0)

      args = ['--out-format', 'none', f.name]
      self.assertNotEqual(_JubaModelCommand.start(args), 0)

      args = ['--no-such-option']
      self.assertNotEqual(_JubaModelCommand.start(args), 0)
Exemple #3
0
 def test_valid_param(self):
     with TempFile() as f:
         f.write(_get_binary_file().read())
         f.flush()
         args = ['--in-format', 'binary', '--out-format', 'json', f.name]
         self.assertEqual(_JubaModelCommand.start(args), 0)
Exemple #4
0
 def test_help(self):
     args = ['--help']
     self.assertEqual(_JubaModelCommand.start(args), 0)
Exemple #5
0
 def _exit(self, args, status):
     return _JubaModelCommand.start(args)
Exemple #6
0
 def test_valid_param(self):
   with TempFile() as f:
     f.write(_get_binary_file().read())
     f.flush()
     args = ['--in-format', 'binary', '--out-format', 'json', f.name]
     self.assertEqual(_JubaModelCommand.start(args), 0)
Exemple #7
0
 def test_help(self):
   args = ['--help']
   self.assertEqual(_JubaModelCommand.start(args), 0)
Exemple #8
0
 def _exit(self, args, status):
   return _JubaModelCommand.start(args)