Skip to content

Commit 085f3b6

Browse files
committed
pytest plugin: Remove deprecated usages
1 parent 7867720 commit 085f3b6

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/libtmux/pytest_plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ def server(
135135
136136
>>> result.assert_outcomes(passed=1)
137137
"""
138-
t = Server(socket_name="libtmux_test%s" % next(namer))
138+
server = Server(socket_name="libtmux_test%s" % next(namer))
139139

140140
def fin() -> None:
141-
t.kill_server()
141+
server.kill()
142142

143143
request.addfinalizer(fin)
144144

145-
return t
145+
return server
146146

147147

148148
@pytest.fixture(scope="function")

src/libtmux/test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,7 @@ def temp_session(
192192
If no ``session_name`` is entered, :func:`get_test_session_name` will make
193193
an unused session name.
194194
195-
The session will destroy itself upon closing with :meth:`Session.
196-
kill_session()`.
195+
The session will destroy itself upon closing with :meth:`Session.session()`.
197196
198197
Parameters
199198
----------
@@ -228,7 +227,7 @@ def temp_session(
228227
yield session
229228
finally:
230229
if server.has_session(session_name):
231-
session.kill_session()
230+
session.kill()
232231
return
233232

234233

0 commit comments

Comments
 (0)