Skip to content

Commit b818cb5

Browse files
committed
Change way we patch test
1 parent e3d36e5 commit b818cb5

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

tests/functional/test_build_and_use_graph.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import pytest
44
from unittest.mock import patch
55
from grimp.application import usecases
6-
import os
6+
77

88
"""
99
For ease of reference, these are the imports of all the files:
@@ -56,9 +56,7 @@ def test_modules():
5656
}
5757

5858

59-
@patch.object(
60-
os, "environ", {usecases.MIN_NUMBER_OF_MODULES_TO_SCAN_USING_MULTIPROCESSING_ENV_NAME: "0"}
61-
)
59+
@patch.object(usecases, "DEFAULT_MIN_NUMBER_OF_MODULES_TO_SCAN_USING_MULTIPROCESSING", 0)
6260
def test_modules_multiprocessing():
6361
"""
6462
This test runs relatively slowly, but it's important we cover the multiprocessing code.

0 commit comments

Comments
 (0)