iterative / iterative/pytest-test-utils

Union/composite matchers?

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
8
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Example use case:
1. I want to check if the exception is of some instance and check that they have correct attrs. We can just do duck typing, but sometimes, we want to have a stricter check.

The following is a snippet that I was playing with in my mind:
```pycon
>>> M.instance_of(YAMLCorruptedError) & M(path="params.yaml")
```

I also see that this API is going to complicate implementation, so we can brainstorm other ideas too to have composite matchers.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.