Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-131178: Add tests forpickle command-line interface#131275

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
picnixz merged 8 commits intopython:mainfromdonBarbos:issue-131178-pickle
Apr 6, 2025
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Add suggestions
  • Loading branch information
@donBarbos
donBarbos committedMar 31, 2025
commit685691810d828cc7e196887207c7e15cd8c62413
13 changes: 5 additions & 8 deletionsLib/test/test_pickle.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,10 +10,10 @@
import tempfile
import warnings
import weakref
from textwrap import dedent

import doctest
import unittest
from textwrap import dedent
from test import support
from test.support import import_helper, os_helper

Expand DownExpand Up@@ -746,15 +746,12 @@ def test_invocation(self):
self.assertListEqual(res.splitlines(), expect.splitlines())

def test_unknown_flag(self):
output = io.StringIO()
stderr = io.StringIO()
with self.assertRaises(SystemExit):
#suppress argparse error message
with contextlib.redirect_stderr(output):
#check that the parser help is shown
with contextlib.redirect_stderr(stderr):
_ = self.invoke_pickle('--unknown')
msg = output.getvalue()
self.assertTrue(msg.startswith('usage: '),
"Output does not start with 'usage: '. "
f"Output was: {msg}")
self.assertStartsWith(stderr.getvalue(), 'usage: ')


def load_tests(loader, tests, pattern):
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp