MOTOR-1106 ERROR: module 'os' has no attribute 'fork' (AttributeError) (#199)

(cherry picked from commit 16c476e618)
This commit is contained in:
Julius Park 2023-03-21 16:59:13 -07:00 committed by Steven Silvester
parent c920be5a31
commit decdb2b528
2 changed files with 4 additions and 1 deletions

View File

@ -11,9 +11,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import test
import unittest
from abc import ABC
from asyncio import new_event_loop, set_event_loop
from multiprocessing import Pipe
@ -151,6 +151,7 @@ class AIOMotorTestBasic(AsyncIOTestCase):
class ExecutorForkTest(AsyncIOTestCase):
@unittest.skipUnless(hasattr(os, "fork"), "This test requires fork")
@asyncio_test()
async def test_executor_reset(self):
parent_conn, child_conn = Pipe()

View File

@ -15,6 +15,7 @@
"""Test Motor, an asynchronous driver for MongoDB and Tornado."""
import os
import test
import unittest
from abc import ABC
from multiprocessing import Pipe
from test.tornado_tests import MotorTest
@ -151,6 +152,7 @@ class MotorTestBasic(MotorTest):
class ExecutorForkTest(MotorTest):
@unittest.skipUnless(hasattr(os, "fork"), "This test requires fork")
@gen_test()
async def test_executor_reset(self):
parent_conn, child_conn = Pipe()