<s> import pytest <EOL> def test_use_twisted ( framework_tx ) : <EOL> pytest . importorskip ( '<STR_LIT>' ) <EOL> import txaio <EOL> txaio . use_twisted ( ) <EOL> assert txaio . using_twisted <EOL> assert not txaio . using_asyncio <EOL> def test_use_twisted_no_twisted ( framework_uninitialized ) : <EOL> try : <EOL> import twisted <EOL> return <EOL> except ImportError : <EOL> pass <EOL> import txaio <EOL> try : <EOL> txaio . use_twisted ( ) <EOL> assert "<STR_LIT>" <EOL> except ImportError : <EOL> pass <EOL> assert not txaio . using_twisted <EOL> def test_use_asyncio ( framework_aio ) : <EOL> pytest . importorskip ( '<STR_LIT>' ) <EOL> import txaio <EOL> txaio . use_asyncio ( ) <EOL> assert txaio . using_asyncio <EOL> assert not txaio . using_twisted </s>
