MCPcopy Index your code
hub / github.com/python/cpython / test_no_args

Method test_no_args

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

Source from the content-addressed store, hash-verified

861
862 @support.requires_subprocess()
863 def test_no_args(self):
864 return_code, output = self.invoke_command_line()
865 excepted_return_code, _ = self.get_excepted_output()
866 self.assertEqual(return_code, excepted_return_code)
867 lines = output.splitlines()
868 self.assertEqual(lines[0], "sys.path = [")
869 self.assertEqual(lines[-4], "]")
870 excepted_base = f"USER_BASE: '{site.getuserbase()}'" +\
871 f" ({self.exists(site.getuserbase())})"
872 self.assertEqual(lines[-3], excepted_base)
873 excepted_site = f"USER_SITE: '{site.getusersitepackages()}'" +\
874 f" ({self.exists(site.getusersitepackages())})"
875 self.assertEqual(lines[-2], excepted_site)
876 self.assertEqual(lines[-1], f"ENABLE_USER_SITE: {site.ENABLE_USER_SITE}")
877
878 @support.requires_subprocess()
879 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