diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index e572aabf..5003b8ca 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -44,8 +44,10 @@ test: - pytest - ipython - line_profiler + - mongomock - pcdsutils - pcdsdevices + - pymongo about: dev_url: https://github.com/pcdshub/happi/ diff --git a/happi/tests/test_backends.py b/happi/tests/test_backends.py index 67a34261..e9bd8d17 100644 --- a/happi/tests/test_backends.py +++ b/happi/tests/test_backends.py @@ -268,6 +268,7 @@ def test_beckoff_axis_device_class(mockqsbackend): assert sam_x.__class__.__name__ == 'IMS' +@requires_mongo def test_multi_backend(mockmulti, item_info, valve_info): mm = mockmulti assert len(mm.all_items) == 3 diff --git a/happi/tests/test_cli.py b/happi/tests/test_cli.py index 1f72946d..d39e8cb5 100644 --- a/happi/tests/test_cli.py +++ b/happi/tests/test_cli.py @@ -1,10 +1,8 @@ # test_cli.py -import cProfile import functools import itertools import logging -import pstats import re from collections.abc import Iterable from typing import Any @@ -829,14 +827,11 @@ def test_profile_cli(runner: CliRunner, happi_cfg: str, args: tuple[str]): print("Resetting the line profiler...") pcdsutils.profile.reset_profiler() - with cProfile.Profile() as pr: - result = runner.invoke( - happi_cli, - ['--path', happi_cfg, 'profile'] + list(args), - ) + result = runner.invoke( + happi_cli, + ['--path', happi_cfg, 'profile'] + list(args), + ) - st = pstats.Stats(pr).strip_dirs().sort_stats("tottime") - st.print_stats(20) assert_in_expected( result, 'Profile completed successfully'