diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2024-10-10 00:20:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-10 00:20:53 +0300 |
commit | 7d2c39752fa6f685f15ad9c585d83a62553477c2 (patch) | |
tree | 51379d14230688dd0cc64603521a160fc68a3648 /Lib/test/test_sqlite3/test_cli.py | |
parent | cbfd39247983309a9ef0ae6da6c61cc71665b967 (diff) | |
download | cpython-7d2c39752fa6f685f15ad9c585d83a62553477c2.tar.gz cpython-7d2c39752fa6f685f15ad9c585d83a62553477c2.zip |
gh-91818: Use default program name in the CLI of many modules (GH-124867)
As argparse now detects by default when the code was run as a module.
This leads to using the actual executable name instead of simply "python"
to display in the usage message ("usage: python -m ...").
Diffstat (limited to 'Lib/test/test_sqlite3/test_cli.py')
-rw-r--r-- | Lib/test/test_sqlite3/test_cli.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_sqlite3/test_cli.py b/Lib/test/test_sqlite3/test_cli.py index 303f9e03b53..d014a9ce841 100644 --- a/Lib/test/test_sqlite3/test_cli.py +++ b/Lib/test/test_sqlite3/test_cli.py @@ -34,7 +34,9 @@ class CommandLineInterface(unittest.TestCase): def test_cli_help(self): out = self.expect_success("-h") - self.assertIn("usage: python -m sqlite3", out) + self.assertIn("usage: ", out) + self.assertIn(" [-h] [-v] [filename] [sql]", out) + self.assertIn("Python sqlite3 CLI", out) def test_cli_version(self): out = self.expect_success("-v") |