Skip to content

Commit

Permalink
fixed some small issues
Browse files Browse the repository at this point in the history
  • Loading branch information
BrentBlanckaert committed Jan 12, 2025
1 parent ef29394 commit a00f09e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tested/dsl/translate_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@
Tab,
Testcase,
TextBuiltin,
TextChannelType,
TextData,
TextOutputChannel,
ValueOutputChannel, TextChannelType,
ValueOutputChannel,
)
from tested.utils import get_args, recursive_dict_merge

Expand Down Expand Up @@ -454,7 +455,7 @@ def _convert_text_output_channel(
assert isinstance(stream, dict)
if (path := stream.get("path")) is not None:
config = context.config.get(config_name, dict())
raw_data = path
raw_data = str(path)

Check warning on line 458 in tested/dsl/translate_parser.py

View check run for this annotation

Codecov / codecov/patch

tested/dsl/translate_parser.py#L457-L458

Added lines #L457 - L458 were not covered by tests
else:
config = context.merge_inheritable_with_specific_config(stream, config_name)
raw_data = str(stream["data"])
Expand All @@ -472,15 +473,19 @@ def _convert_text_output_channel(
if "oracle" not in stream or stream["oracle"] == "builtin":
if path is not None:
return TextOutputChannel(

Check warning on line 475 in tested/dsl/translate_parser.py

View check run for this annotation

Codecov / codecov/patch

tested/dsl/translate_parser.py#L475

Added line #L475 was not covered by tests
data=data, oracle=GenericTextOracle(options=config), type=TextChannelType.FILE
data=data,
oracle=GenericTextOracle(options=config),
type=TextChannelType.FILE,
)
return TextOutputChannel(
data=data, oracle=GenericTextOracle(options=config)
)
elif stream["oracle"] == "custom_check":
if path is not None:
return TextOutputChannel(

Check warning on line 485 in tested/dsl/translate_parser.py

View check run for this annotation

Codecov / codecov/patch

tested/dsl/translate_parser.py#L485

Added line #L485 was not covered by tests
data=data, oracle=_convert_custom_check_oracle(stream), type=TextChannelType.FILE
data=data,
oracle=_convert_custom_check_oracle(stream),
type=TextChannelType.FILE,
)
return TextOutputChannel(
data=data, oracle=_convert_custom_check_oracle(stream)
Expand Down

0 comments on commit a00f09e

Please sign in to comment.