Skip to content

Commit

Permalink
fix docstring and test
Browse files Browse the repository at this point in the history
  • Loading branch information
yczhang-nv committed Oct 10, 2024
1 parent 66b66c0 commit 87eecb6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ def accepted_types(self) -> typing.Tuple:
Raises
------
RuntimeError
if the accepted cannot be deducted from either __orig_class__ or __orig_bases__
If the accepted types cannot be deduced from either __orig_class__ or __orig_bases__.
Returns
------
-------
typing.Tuple
accepted input types
Accepted input types.
"""

# There are two approaches to inherit from this class:
Expand Down
5 changes: 3 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,8 @@ def mock_subscription_fixture():


# ==== SharedProcessPool Fixtures ====
@pytest.fixture(scope="session")
# Any tests that use the SharedProcessPool should use this fixture
@pytest.fixture(scope="module")
def shared_process_pool_setup_and_teardown():
# Set lower CPU usage for unit test to avoid slowing down the test
os.environ["MORPHEUS_SHARED_PROCESS_POOL_CPU_USAGE"] = "0.1"
Expand All @@ -1166,7 +1167,7 @@ def shared_process_pool_setup_and_teardown():
pool.stop()
pool.join()
pool.reset()
yield
yield pool

# Stop the pool after all tests are done
pool.stop()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_multi_processing_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from morpheus.stages.preprocess.deserialize_stage import DeserializeStage


@pytest.fixture(scope="session", autouse=True)
@pytest.fixture(scope="module", autouse=True)
def setup_and_teardown(shared_process_pool_setup_and_teardown): # pylint: disable=unused-argument
pass

Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_shared_process_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# This test has issues with joining processes when testing with pytest `-s` option. Run pytest without `-s` flag


@pytest.fixture(scope="session", autouse=True)
@pytest.fixture(scope="module", autouse=True)
def setup_and_teardown(shared_process_pool_setup_and_teardown): # pylint: disable=unused-argument
pass

Expand Down

0 comments on commit 87eecb6

Please sign in to comment.