Skip to content

Commit 6ee0143

Browse files
committed
pytest warning: Remove pytest mark from fixture
1 parent 265eb14 commit 6ee0143

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828
USING_ZSH = "zsh" in os.getenv("SHELL", "")
2929

3030

31-
@pytest.mark.skipif(not USING_ZSH, reason="Using ZSH")
3231
@pytest.fixture(autouse=USING_ZSH, scope="session")
33-
def zshrc(user_path: pathlib.Path) -> pathlib.Path:
32+
def zshrc(user_path: pathlib.Path) -> t.Optional[pathlib.Path]:
3433
"""Quiets ZSH default message.
3534
3635
Needs a startup file .zshenv, .zprofile, .zshrc, .zlogin.
3736
"""
37+
if not USING_ZSH:
38+
return None
3839
p = user_path / ".zshrc"
3940
p.touch()
4041
return p

0 commit comments

Comments
 (0)