Kaydet (Commit) 319d58d5 authored tarafından R David Murray's avatar R David Murray

#17484: add tests for getpass.

Patch by Thomas Fenzl.
üst 7efa3b82
...@@ -40,6 +40,7 @@ def unix_getpass(prompt='Password: ', stream=None): ...@@ -40,6 +40,7 @@ def unix_getpass(prompt='Password: ', stream=None):
""" """
fd = None fd = None
tty = None tty = None
passwd = None
try: try:
# Always try reading and writing directly on the tty first. # Always try reading and writing directly on the tty first.
fd = os.open('/dev/tty', os.O_RDWR|os.O_NOCTTY) fd = os.open('/dev/tty', os.O_RDWR|os.O_NOCTTY)
......
...@@ -6,7 +6,7 @@ import unittest ...@@ -6,7 +6,7 @@ import unittest
class TestUntestedModules(unittest.TestCase): class TestUntestedModules(unittest.TestCase):
def test_untested_modules_can_be_imported(self): def test_untested_modules_can_be_imported(self):
untested = ('bdb', 'encodings', 'formatter', 'getpass', 'imghdr', untested = ('bdb', 'encodings', 'formatter', 'imghdr',
'keyword', 'macurl2path', 'nturl2path', 'tabnanny') 'keyword', 'macurl2path', 'nturl2path', 'tabnanny')
with support.check_warnings(quiet=True): with support.check_warnings(quiet=True):
for name in untested: for name in untested:
......
...@@ -367,6 +367,7 @@ Michael Farrell ...@@ -367,6 +367,7 @@ Michael Farrell
Troy J. Farrell Troy J. Farrell
Mark Favas Mark Favas
Boris Feld Boris Feld
Thomas Fenzl
Niels Ferguson Niels Ferguson
Sebastian Fernandez Sebastian Fernandez
Florian Festi Florian Festi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment