mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-07-23 00:42:28 +00:00

* rearrange code * fix tests * relnote * merge test modules * remove extra * rearrange draw tests * forgot * remove unused import
14 lines
430 B
Python
14 lines
430 B
Python
# SPDX-FileCopyrightText: 2022-present deepset GmbH <info@deepset.ai>
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
from haystack.testing.sample_components import Parity
|
|
from haystack.core.serialization import component_to_dict, component_from_dict
|
|
|
|
|
|
def test_parity():
|
|
component = Parity()
|
|
results = component.run(value=1)
|
|
assert results == {"odd": 1}
|
|
results = component.run(value=2)
|
|
assert results == {"even": 2}
|