Skip to content

Commit

Permalink
fix circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Jul 18, 2020
1 parent 6f99c5b commit c2bc1db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/_pytest/monkeypatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from typing import Sequence
from typing import Union

import pytest
from _pytest.compat import TYPE_CHECKING
from _pytest.fixtures import fixture
from _pytest.pathlib import Path
Expand Down Expand Up @@ -256,6 +255,8 @@ def setenv(
if value is None:
return self.delenv(name, raising=False)
if not isinstance(value, str):
import pytest

warnings.warn(
pytest.PytestWarning(
"Value of environment variable {name} type should be str, but got "
Expand Down

0 comments on commit c2bc1db

Please sign in to comment.