summaryrefslogtreecommitdiff
path: root/Lib/test/test_stat.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_stat.py')
-rw-r--r--Lib/test/test_stat.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_stat.py b/Lib/test/test_stat.py
index 38ff2bcf8a..17443bed07 100644
--- a/Lib/test/test_stat.py
+++ b/Lib/test/test_stat.py
@@ -2,7 +2,8 @@ import unittest
import os
import socket
import sys
-from test.support import TESTFN, import_fresh_module
+from test.support import (TESTFN, import_fresh_module,
+ skip_unless_bind_unix_socket)
c_stat = import_fresh_module('stat', fresh=['_stat'])
py_stat = import_fresh_module('stat', blocked=['_stat'])
@@ -192,7 +193,7 @@ class TestFilemode:
self.assertS_IS("BLK", st_mode)
break
- @unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'requires unix socket')
+ @skip_unless_bind_unix_socket
def test_socket(self):
with socket.socket(socket.AF_UNIX) as s:
s.bind(TESTFN)