-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
test_keywords
here:
cpython/Lib/test/test_popen.py
Lines 65 to 68 in 7fd6160
def test_keywords(self): | |
with os.popen(cmd="exit 0", mode="w", buffering=-1): | |
pass | |
does not assert anything. I propose to use an example similar to this one:
cpython/Lib/test/test_popen.py
Lines 57 to 59 in 7fd6160
def test_contextmanager(self): | |
with os.popen("echo hello") as f: | |
self.assertEqual(f.read(), "hello\n") |
and at least assert that the expected program executed and that f
is still not closed in with
body.
I have a PR ready.
Linked PRs
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error