-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add tests for the new conditions, use the coverage-based tests in cI
- Loading branch information
1 parent
52d87e1
commit 5d4aada
Showing
4 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright (c) 2024 Microsoft Corporation. | ||
"""reactivedataflow Conditions Tests.""" | ||
|
||
from reactivedataflow import VerbInput, VerbOutput | ||
from reactivedataflow.conditions import ( | ||
array_result_not_empty, | ||
output_is_not_none, | ||
) | ||
from reactivedataflow.constants import default_output | ||
|
||
|
||
def test_array_results_not_empty(): | ||
check = array_result_not_empty() | ||
inputs = VerbInput() | ||
outputs = VerbOutput({default_output: []}) | ||
assert check(inputs, outputs) is False | ||
|
||
outputs = VerbOutput({default_output: [1]}) | ||
assert check(inputs, outputs) is True | ||
|
||
|
||
def test_output_is_not_none(): | ||
check = output_is_not_none(default_output) | ||
inputs = VerbInput() | ||
outputs = VerbOutput({default_output: None}) | ||
assert check(inputs, outputs) is False | ||
|
||
outputs = VerbOutput({default_output: 1}) | ||
assert check(inputs, outputs) is True |