diff options
Diffstat (limited to 'Lib/test/test_urllibnet.py')
| -rw-r--r-- | Lib/test/test_urllibnet.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py index 1d88331..4ce7a9b 100644 --- a/Lib/test/test_urllibnet.py +++ b/Lib/test/test_urllibnet.py @@ -112,12 +112,9 @@ class urlopenNetworkTests(unittest.TestCase): open_url.close() self.assertEqual(code, 404) + @unittest.skipIf(sys.platform in ('win32',), 'not appropriate for Windows') + @unittest.skipUnless(hasattr(os, 'fdopen'), 'os.fdopen not available') def test_fileno(self): - if (sys.platform in ('win32',) or - not hasattr(os, 'fdopen')): - # On Windows, socket handles are not file descriptors; this - # test can't pass on Windows. - return # Make sure fd returned by fileno is valid. open_url = self.urlopen("http://www.python.org/") fd = open_url.fileno() |
