From 366ac7437383d3e9a99a971e61afbc5c466bbfcc Mon Sep 17 00:00:00 2001 From: Dmitrii Agibov Date: Tue, 4 Oct 2022 15:18:55 +0100 Subject: MLIA-673 Use inclusive language in the source code and filenames - Update configuration for inclusive language linter - Fix reported issues Change-Id: If0f8b6e20c17d8ee1c6179c61040fc351437f036 --- tests/test_core_mixins.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'tests/test_core_mixins.py') diff --git a/tests/test_core_mixins.py b/tests/test_core_mixins.py index d66213d..3834fb3 100644 --- a/tests/test_core_mixins.py +++ b/tests/test_core_mixins.py @@ -10,22 +10,22 @@ from mlia.core.mixins import ContextMixin from mlia.core.mixins import ParameterResolverMixin -def test_context_mixin(dummy_context: Context) -> None: +def test_context_mixin(sample_context: Context) -> None: """Test ContextMixin.""" class SampleClass(ContextMixin): """Sample class.""" sample_object = SampleClass() - sample_object.set_context(dummy_context) - assert sample_object.context == dummy_context + sample_object.set_context(sample_context) + assert sample_object.context == sample_context class TestParameterResolverMixin: """Tests for parameter resolver mixin.""" @staticmethod - def test_parameter_resolver_mixin(dummy_context: ExecutionContext) -> None: + def test_parameter_resolver_mixin(sample_context: ExecutionContext) -> None: """Test ParameterResolverMixin.""" class SampleClass(ParameterResolverMixin): @@ -33,7 +33,7 @@ class TestParameterResolverMixin: def __init__(self) -> None: """Init sample object.""" - self.context = dummy_context + self.context = sample_context self.context.update( advice_category=AdviceCategory.OPERATORS, @@ -55,7 +55,7 @@ class TestParameterResolverMixin: @staticmethod def test_parameter_resolver_mixin_no_config( - dummy_context: ExecutionContext, + sample_context: ExecutionContext, ) -> None: """Test ParameterResolverMixin without config params.""" @@ -64,7 +64,7 @@ class TestParameterResolverMixin: def __init__(self) -> None: """Init sample object.""" - self.context = dummy_context + self.context = sample_context with pytest.raises(Exception, match="Configuration parameters are not set"): sample_object_no_config = SampleClassNoConfig() @@ -72,7 +72,7 @@ class TestParameterResolverMixin: @staticmethod def test_parameter_resolver_mixin_bad_section( - dummy_context: ExecutionContext, + sample_context: ExecutionContext, ) -> None: """Test ParameterResolverMixin without config params.""" @@ -81,7 +81,7 @@ class TestParameterResolverMixin: def __init__(self) -> None: """Init sample object.""" - self.context = dummy_context + self.context = sample_context self.context.update( advice_category=AdviceCategory.OPERATORS, event_handlers=[], -- cgit v1.2.1