Skip to content

Commit

Permalink
MOTOR-1106 ERROR: module 'os' has no attribute 'fork' (AttributeError) (
Browse files Browse the repository at this point in the history
#199)

(cherry picked from commit 16c476e)
  • Loading branch information
juliusgeo authored and blink1073 committed Apr 3, 2023
1 parent c920be5 commit decdb2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/asyncio_tests/test_asyncio_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -151,6 +151,7 @@ def __getitem__(self, name):


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()
Expand Down
2 changes: 2 additions & 0 deletions test/tornado_tests/test_motor_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -151,6 +152,7 @@ def __getitem__(self, name):


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()
Expand Down

0 comments on commit decdb2b

Please sign in to comment.