Skip to content

Commit

Permalink
chore: use pydantic short version in tests (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
tedil authored Dec 9, 2024
1 parent 7994640 commit 21d882f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,15 @@ def test_workflow_check_config_invalid_search_pattern(
# so pydantic tries to parse *2* dicts from the list and fails
assert len(errors) == 2

import pydantic
pydantic_version = pydantic.version.version_short()
expected_errors = [
{
"input": input_str,
"loc": ("step_config", "variant_export_external", "search_patterns", i),
"msg": "Input should be a valid dictionary",
"type": "dict_type",
"url": "https://errors.pydantic.dev/2.7/v/dict_type",
"url": f"https://errors.pydantic.dev/{pydantic_version}/v/dict_type",
}
for i, input_str in enumerate(["vcf", "*/*.vcf.gz"])
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,15 @@ def test_workflow_check_config_invalid_search_pattern(
# so pydantic tries to parse *2* dicts from the list and fails
assert len(errors) == 2

import pydantic
pydantic_version = pydantic.version.version_short()
expected_errors = [
{
"input": input_str,
"loc": ("step_config", "wgs_cnv_export_external", "search_patterns", i),
"msg": "Input should be a valid dictionary",
"type": "dict_type",
"url": "https://errors.pydantic.dev/2.7/v/dict_type",
"url": f"https://errors.pydantic.dev/{pydantic_version}/v/dict_type",
}
for i, input_str in enumerate(["vcf", "*/*.vcf.gz"])
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,15 @@ def test_workflow_check_config_invalid_search_pattern(
# so pydantic tries to parse *2* dicts from the list and fails
assert len(errors) == 2

import pydantic
pydantic_version = pydantic.version.version_short()
expected_errors = [
{
"input": input_str,
"loc": ("step_config", "wgs_sv_export_external", "search_patterns", i),
"msg": "Input should be a valid dictionary",
"type": "dict_type",
"url": "https://errors.pydantic.dev/2.7/v/dict_type",
"url": f"https://errors.pydantic.dev/{pydantic_version}/v/dict_type",
}
for i, input_str in enumerate(["vcf", "*/*.vcf.gz"])
]
Expand Down

0 comments on commit 21d882f

Please sign in to comment.