Skip to content

Commit 58f028a

Browse files
committed
Only import pytest_twisted as pt as needed in the tests
1 parent 7d5c168 commit 58f028a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

testing/test_basic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,19 @@ def test_succeed():
133133
def test_pytest_from_reactor_thread(testdir):
134134
testdir.makepyfile("""
135135
import pytest
136-
import pytest_twisted as pt
136+
import pytest_twisted
137137
from twisted.internet import reactor, defer
138138
139139
@pytest.fixture
140140
def fix():
141141
d = defer.Deferred()
142142
reactor.callLater(0.01, d.callback, 42)
143-
return pt.blockon(d)
143+
return pytest_twisted.blockon(d)
144144
145145
def test_simple(fix):
146146
assert fix == 42
147147
148-
@pt.inlineCallbacks
148+
@pytest_twisted.inlineCallbacks
149149
def test_fail():
150150
d = defer.Deferred()
151151
reactor.callLater(0.01, d.callback, 1)

0 commit comments

Comments
 (0)