()
| 4 | |
| 5 | |
| 6 | def test_parse_spec(): |
| 7 | flow_filter, subject, replacement = parse_spec("/foo/bar/voing") |
| 8 | assert flow_filter.pattern == "foo" |
| 9 | assert subject == "bar" |
| 10 | assert replacement == "voing" |
| 11 | |
| 12 | flow_filter, subject, replacement = parse_spec("/bar/voing") |
| 13 | assert flow_filter(1) is True |
| 14 | assert subject == "bar" |
| 15 | assert replacement == "voing" |
| 16 | |
| 17 | with pytest.raises(ValueError, match="Invalid number of parameters"): |
| 18 | parse_spec("/") |
| 19 | |
| 20 | with pytest.raises(ValueError, match="Invalid filter expression"): |
| 21 | parse_spec("/~b/one/two") |
nothing calls this directly
no test coverage detected
searching dependent graphs…