From da2c1afb5f2653e9a27203be6067e465bdedca12 Mon Sep 17 00:00:00 2001 From: Eran Rivlis Date: Sun, 4 Aug 2024 01:12:18 +0300 Subject: [PATCH] fixes --- src/mappingtools.py | 2 +- tests/test_mapping_collector.py | 1 - tests/test_stream_dict_records.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mappingtools.py b/src/mappingtools.py index 13e0d58..67bf3ab 100644 --- a/src/mappingtools.py +++ b/src/mappingtools.py @@ -4,7 +4,7 @@ from collections.abc import Callable, Generator, Iterable, Mapping from enum import Enum, auto from itertools import chain -from typing import Any, NamedTuple, TypeVar +from typing import Any, TypeVar K = TypeVar('K') KT = TypeVar('KT') diff --git a/tests/test_mapping_collector.py b/tests/test_mapping_collector.py index 688ef4c..744f5dc 100644 --- a/tests/test_mapping_collector.py +++ b/tests/test_mapping_collector.py @@ -79,7 +79,6 @@ def test_adding_key_value_pairs_in_first_mode(): # Initialization with invalid mode def test_initialization_with_invalid_mode(): - from mappingtools import MappingCollector # Arrange & Act & Assert with pytest.raises(ValueError): MappingCollector("INVALID_MODE") diff --git a/tests/test_stream_dict_records.py b/tests/test_stream_dict_records.py index a7ffc13..19967de 100644 --- a/tests/test_stream_dict_records.py +++ b/tests/test_stream_dict_records.py @@ -159,4 +159,4 @@ def test_large_dictionaries_performance(): # Act & Assert (no assertion needed for performance, just ensure it runs) for _ in stream_dict_records(input_dict): - pass + assert _ is not None