| 203 | level=logging.WARNING) |
| 204 | |
| 205 | def test_subset_cli(mocker): |
| 206 | with pytest.raises(AssertionError): |
| 207 | SubsetParams.generate(target_function='', upstream_depth=1, downstream_depth=0) |
| 208 | with pytest.raises(AssertionError): |
| 209 | SubsetParams.generate(target_function='', upstream_depth=0, downstream_depth=1) |
| 210 | with pytest.raises(AssertionError): |
| 211 | SubsetParams.generate(target_function='test', upstream_depth=0, downstream_depth=0) |
| 212 | with pytest.raises(AssertionError): |
| 213 | SubsetParams.generate(target_function='test', upstream_depth=-1, downstream_depth=0) |
| 214 | with pytest.raises(AssertionError): |
| 215 | SubsetParams.generate(target_function='test', upstream_depth=0, downstream_depth=-1) |
| 216 | |
| 217 | with pytest.raises(AssertionError): |
| 218 | main(['test_code/py/subset_find_exception/zero.py', '--target-function', 'func', '--upstream-depth', '1']) |
| 219 | |
| 220 | with pytest.raises(AssertionError): |
| 221 | main(['test_code/py/subset_find_exception/two.py', '--target-function', 'func', '--upstream-depth', '1']) |
| 222 | |
| 223 | |