tests/spec/unit/driver/test_fzn_flags_arg_conflict.py
raw| 1 | from minizinc import default_driver, Driver |
| 2 | import subprocess |
| 3 | |
| 4 | |
| 5 | def test_fzn_flags_arg_conflict(): |
| 6 | assert isinstance(default_driver, Driver) |
| 7 | # Should fail with no model file given, and not print help |
| 8 | p = subprocess.run( |
| 9 | [default_driver._executable, "--fzn-flags", "--help"], |
| 10 | stdin=None, |
| 11 | stdout=subprocess.PIPE, |
| 12 | stderr=subprocess.PIPE, |
| 13 | ) |
| 14 | assert p.returncode == 1 |