Skip to content

gh-131178: Add tests for site command-line interface #133582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
gh-131178: Add tests for site command-line interface
  • Loading branch information
ggqlq committed May 7, 2025
commit 6497282c6084fa66760d5831e738f1509005c35f
6 changes: 2 additions & 4 deletions Lib/test/test_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,6 @@ def test_no_args(self):
excepted_return_code, excepted_output = self.get_excepted_output()
self.assertEqual(return_code, excepted_return_code)
self.assertEqual(output, excepted_output)
# self.assertTrue(fnmatch.fnmatch(output, excepted_output))

def test_unknown_args(self):
return_code, output = self.invoke_command_line("--unknown-arg")
Expand All @@ -881,22 +880,21 @@ def test_base_arg(self):
excepted_return_code, excepted_output = excepted
self.assertEqual(return_code, excepted_return_code)
self.assertEqual(output, excepted_output)
self.assertTrue(fnmatch.fnmatch(output, excepted_output))

def test_site_arg(self):
return_code, output = self.invoke_command_line("--user-site")
excepted = self.get_excepted_output("--user-site")
excepted_return_code, excepted_output = excepted
self.assertEqual(return_code, excepted_return_code)
self.assertTrue(fnmatch.fnmatch(output, excepted_output))
self.assertEqual(output, excepted_output)

def test_both_args(self):
return_code, output = self.invoke_command_line("--user-base",
"--user-site")
excepted = self.get_excepted_output("--user-base", "--user-site")
excepted_return_code, excepted_output = excepted
self.assertEqual(return_code, excepted_return_code)
self.assertTrue(fnmatch.fnmatch(output, excepted_output))
self.assertEqual(output, excepted_output)


if __name__ == "__main__":
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy