Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #4
0
 def test_help(self):
     args = ['--help']
     self.assertEqual(_JubaModelCommand.start(args), 0)
Beispiel #5
0
 def _exit(self, args, status):
     return _JubaModelCommand.start(args)
Beispiel #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)
Beispiel #7
0
 def test_help(self):
   args = ['--help']
   self.assertEqual(_JubaModelCommand.start(args), 0)
Beispiel #8
0
 def _exit(self, args, status):
   return _JubaModelCommand.start(args)