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