コード例 #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)
コード例 #2
0
ファイル: test_model.py プロジェクト: shiodat/jubakit
  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)
コード例 #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)
コード例 #4
0
 def test_help(self):
     args = ['--help']
     self.assertEqual(_JubaModelCommand.start(args), 0)
コード例 #5
0
 def _exit(self, args, status):
     return _JubaModelCommand.start(args)
コード例 #6
0
ファイル: test_model.py プロジェクト: shiodat/jubakit
 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)
コード例 #7
0
ファイル: test_model.py プロジェクト: shiodat/jubakit
 def test_help(self):
   args = ['--help']
   self.assertEqual(_JubaModelCommand.start(args), 0)
コード例 #8
0
ファイル: test_model.py プロジェクト: shiodat/jubakit
 def _exit(self, args, status):
   return _JubaModelCommand.start(args)