Skip to content

Commit

Permalink
fix according to pytest documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
clintonsteiner committed Dec 18, 2024
1 parent d05a715 commit bedd239
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jenkinsapi_tests/unittests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pytz
from . import configs
import datetime
import warnings
from typing import List
from jenkinsapi.build import Build
from jenkinsapi.job import Job
Expand Down Expand Up @@ -275,10 +276,9 @@ def fake_get_data(cls, tree=None, params=None):
monkeypatch.setattr(Build, "get_data", fake_get_data)

with pytest.raises(Exception) as excinfo:
with pytest.warns(None) as record:
with warnings.catch_warnings():
build.get_env_vars()
assert "" == str(excinfo.value)
assert len(record) == 0


def test_build_get_status(build) -> None:
Expand Down

0 comments on commit bedd239

Please sign in to comment.