Skip to content

[FR]: Support filter_file in assert_json_matches #32

@ARR4N

Description

@ARR4N

What is the current behavior?

Only string-literal filters can be passed to assert_json_matches, but jq() supports using files.

Describe the feature

Change the signature to:

assert_json_matches(name, file1, file2, filter1 = ".", filter2 = ".", filter_file1 = None, filter_file2 = None, **kwargs):

I'm happy to send a PR if you'd like; please assign the Issue to me if you agree that this is a worthwhile feature.

One problem will be incompatibility between the filter and filter_file args. Thoughts on having filter_file override filter i.f.f. filter == "."? This maintains backwards compatibility while avoiding ambiguity if both are set.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions