Skip to content

Commit aa58556

Browse files
committed
tests: Skip tests that require working socket
1 parent 59250bc commit aa58556

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/test/test_unittest/testmock/testmock.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55
import tempfile
66

7-
from test.support import ALWAYS_EQ
7+
from test.support import ALWAYS_EQ, requires_working_socket
88
import unittest
99
from test.test_unittest.testmock.support import is_instance
1010
from unittest import mock
@@ -765,6 +765,7 @@ def _check_autospeced_something_method_async(self, mock_method):
765765
sentinel.c, e=sentinel.e)
766766

767767

768+
@requires_working_socket()
768769
def test_mock_autospec_all_members_async(self):
769770
for spec in [SomethingAsync, SomethingAsync()]:
770771
mock_something = AsyncMock(autospec=spec)
@@ -2057,6 +2058,7 @@ def test_mock_add_spec_autospec_all_members(self):
20572058
self._check_autospeced_something(mock_something)
20582059

20592060

2061+
@requires_working_socket()
20602062
def test_mock_add_spec_autospec_all_members_async(self):
20612063
for spec in [SomethingAsync, SomethingAsync()]:
20622064
mock_something = Mock()

0 commit comments

Comments
 (0)