code: def test_fails_on_unknown_command(self):
      sys.argv = [
          "bogus",  # command
          "unknown_model",  # model_name
          "bogus file",  # input_file
          "--output-file",
          "bogus out file",
          "--silent",
      ]
  
      with self.assertRaises(
          SystemExit
      ) as cm:  # pylint: disable=invalid-name
          main()
  
      assert cm.exception.code == 2
  
file_path: magnitude/pymagnitude/third_party/allennlp/tests/commands/main_test.py
imports: from __future__ import division
  from __future__ import with_statement
  from __future__ import absolute_import
  import shutil
  import sys
  import pytest
  from allennlp.commands import main
  from allennlp.commands.subcommand import Subcommand
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.testing import AllenNlpTestCase
  from io import open
label_desc: Use image node_id 1 for calling the TestMain obj's underlying member method code with example usage: obj.test_fails_on_unknown_command() without return types