File tree 3 files changed +33
-18
lines changed
3 files changed +33
-18
lines changed Original file line number Diff line number Diff line change 24
24
SOFTWARE.
25
25
"""
26
26
27
- import unittest
28
- import asyncio
29
- import uvloop
30
27
import async_connect as connect
28
+ import unittest
29
+ import sys
31
30
32
31
33
32
class TestGetAllCatalog (unittest .TestCase ):
34
33
def setUp (self ):
35
- asyncio .set_event_loop_policy (uvloop .EventLoopPolicy ())
36
- self .loop = asyncio .get_event_loop ()
37
- self .connect = connect .Client (loop = self .loop )
34
+ if sys .version_info [1 ] == 6 :
35
+ import asyncio
36
+ import uvloop
37
+ asyncio .set_event_loop_policy (uvloop .EventLoopPolicy ())
38
+ self .loop = asyncio .get_event_loop ()
39
+ self .connect = connect .Client (loop = self .loop )
40
+ else :
41
+ self .connect = connect .Client ()
42
+ self .loop = self .connect .loop
38
43
39
44
def test_release (self ):
40
45
async def test ():
Original file line number Diff line number Diff line change 24
24
SOFTWARE.
25
25
"""
26
26
27
- import unittest
28
- import asyncio
29
- import uvloop
30
27
import async_connect as connect
28
+ import unittest
29
+ import sys
31
30
32
31
33
32
class TestGetAllCatalog (unittest .TestCase ):
34
33
def setUp (self ):
35
- asyncio .set_event_loop_policy (uvloop .EventLoopPolicy ())
36
- self .loop = asyncio .get_event_loop ()
37
- self .connect = connect .Client (loop = self .loop )
34
+ if sys .version_info [1 ] == 6 :
35
+ import asyncio
36
+ import uvloop
37
+ asyncio .set_event_loop_policy (uvloop .EventLoopPolicy ())
38
+ self .loop = asyncio .get_event_loop ()
39
+ self .connect = connect .Client (loop = self .loop )
40
+ else :
41
+ self .connect = connect .Client ()
42
+ self .loop = self .connect .loop
38
43
39
44
def test_release (self ):
40
45
async def test ():
Original file line number Diff line number Diff line change 24
24
SOFTWARE.
25
25
"""
26
26
27
- import unittest
28
- import asyncio
29
- import uvloop
30
27
import async_connect as connect
28
+ import unittest
29
+ import sys
31
30
32
31
33
32
class TestSearch (unittest .TestCase ):
34
33
def setUp (self ):
35
- asyncio .set_event_loop_policy (uvloop .EventLoopPolicy ())
36
- self .loop = asyncio .get_event_loop ()
37
- self .connect = connect .Client (loop = self .loop )
34
+ if sys .version_info [1 ] == 6 :
35
+ import asyncio
36
+ import uvloop
37
+ asyncio .set_event_loop_policy (uvloop .EventLoopPolicy ())
38
+ self .loop = asyncio .get_event_loop ()
39
+ self .connect = connect .Client (loop = self .loop )
40
+ else :
41
+ self .connect = connect .Client ()
42
+ self .loop = self .connect .loop
38
43
39
44
def test_release (self ):
40
45
async def test ():
You can’t perform that action at this time.
0 commit comments