jenkins-job-builder/tests/cmd/test_cmd.py
Vsevolod Fedorov f4d64f9f66 Move tests to pytest
Pytest makes each scenario into individual selectable test.
To be able to run each scenario separately is very useful for development.

Change-Id: I4b1c990a1fd839ce327cd7faa27159a9b9632fed
2022-12-20 10:44:43 +03:00

12 lines
221 B
Python

import pytest
from jenkins_jobs.cli import entry
def test_with_empty_args(mocker):
"""
User passes no args, should fail with SystemExit
"""
with pytest.raises(SystemExit):
entry.JenkinsJobs([])