mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
also skip test_device_encoding when stdin isn't a tty
This commit is contained in:
parent
efb00c0cc1
commit
e308b7c0c0
1 changed files with 2 additions and 2 deletions
|
@ -1433,8 +1433,8 @@ class DeviceEncodingTests(unittest.TestCase):
|
|||
# Return None when an fd doesn't actually exist.
|
||||
self.assertIsNone(os.device_encoding(123456))
|
||||
|
||||
@unittest.skipUnless(sys.platform.startswith('win') or
|
||||
(hasattr(locale, 'nl_langinfo') and hasattr(locale, 'CODESET')),
|
||||
@unittest.skipUnless(os.isatty(0) and (sys.platform.startswith('win') or
|
||||
(hasattr(locale, 'nl_langinfo') and hasattr(locale, 'CODESET'))),
|
||||
'test requires either Windows or nl_langinfo(CODESET)')
|
||||
def test_device_encoding(self):
|
||||
encoding = os.device_encoding(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue