8
8
9
9
import pytest
10
10
11
- from _pytest .monkeypatch import MonkeyPatch
12
-
13
11
import libtmux
14
12
from libtmux .common import (
15
13
TMUX_MAX_VERSION ,
31
29
version_regex = re .compile (r"([0-9]\.[0-9])|(master)" )
32
30
33
31
34
- def test_allows_master_version (monkeypatch : MonkeyPatch ) -> None :
32
+ def test_allows_master_version (monkeypatch : pytest . MonkeyPatch ) -> None :
35
33
class Hi :
36
34
stdout = ["tmux master" ]
37
35
stderr = None
@@ -49,7 +47,7 @@ def mock_tmux_cmd(*args: t.Any, **kwargs: t.Any) -> Hi:
49
47
), "Is the latest supported version with -master appended"
50
48
51
49
52
- def test_allows_next_version (monkeypatch : MonkeyPatch ) -> None :
50
+ def test_allows_next_version (monkeypatch : pytest . MonkeyPatch ) -> None :
53
51
TMUX_NEXT_VERSION = str (float (TMUX_MAX_VERSION ) + 0.1 )
54
52
55
53
class Hi :
@@ -67,7 +65,7 @@ def mock_tmux_cmd(*args: t.Any, **kwargs: t.Any) -> Hi:
67
65
assert TMUX_NEXT_VERSION == get_version ()
68
66
69
67
70
- def test_get_version_openbsd (monkeypatch : MonkeyPatch ) -> None :
68
+ def test_get_version_openbsd (monkeypatch : pytest . MonkeyPatch ) -> None :
71
69
class Hi :
72
70
stderr = ["tmux: unknown option -- V" ]
73
71
@@ -84,7 +82,7 @@ def mock_tmux_cmd(*args: t.Any, **kwargs: t.Any) -> Hi:
84
82
), "Is the latest supported version with -openbsd appended"
85
83
86
84
87
- def test_get_version_too_low (monkeypatch : MonkeyPatch ) -> None :
85
+ def test_get_version_too_low (monkeypatch : pytest . MonkeyPatch ) -> None :
88
86
class Hi :
89
87
stderr = ["tmux: unknown option -- V" ]
90
88
@@ -97,7 +95,7 @@ def mock_tmux_cmd(*args: t.Any, **kwargs: t.Any) -> Hi:
97
95
exc_info .match ("is running tmux 1.3 or earlier" )
98
96
99
97
100
- def test_ignores_letter_versions (monkeypatch : MonkeyPatch ) -> None :
98
+ def test_ignores_letter_versions (monkeypatch : pytest . MonkeyPatch ) -> None :
101
99
"""Ignore letters such as 1.8b.
102
100
103
101
See ticket https://github.com/tmux-python/tmuxp/issues/55.
@@ -120,7 +118,7 @@ def test_ignores_letter_versions(monkeypatch: MonkeyPatch) -> None:
120
118
assert type (has_version ("1.9a" )) is bool
121
119
122
120
123
- def test_error_version_less_1_7 (monkeypatch : MonkeyPatch ) -> None :
121
+ def test_error_version_less_1_7 (monkeypatch : pytest . MonkeyPatch ) -> None :
124
122
def mock_get_version () -> LooseVersion :
125
123
return LooseVersion ("1.7" )
126
124
0 commit comments