MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_no_args

Method test_no_args

Lib/test/test_site.py:871–884  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

869
870 @support.requires_subprocess()
871 def test_no_args(self):
872 return_code, output = self.invoke_command_line()
873 excepted_return_code, _ = self.get_excepted_output()
874 self.assertEqual(return_code, excepted_return_code)
875 lines = output.splitlines()
876 self.assertEqual(lines[0], "sys.path = [")
877 self.assertEqual(lines[-4], "]")
878 excepted_base = f"USER_BASE: '{site.getuserbase()}'" +\
879 f" ({self.exists(site.getuserbase())})"
880 self.assertEqual(lines[-3], excepted_base)
881 excepted_site = f"USER_SITE: '{site.getusersitepackages()}'" +\
882 f" ({self.exists(site.getusersitepackages())})"
883 self.assertEqual(lines[-2], excepted_site)
884 self.assertEqual(lines[-1], f"ENABLE_USER_SITE: {site.ENABLE_USER_SITE}")
885
886 @support.requires_subprocess()
887 def test_unknown_args(self):

Callers

nothing calls this directly

Calls 5

invoke_command_lineMethod · 0.95
get_excepted_outputMethod · 0.95
existsMethod · 0.95
assertEqualMethod · 0.45
splitlinesMethod · 0.45

Tested by

no test coverage detected