File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ allow_failure:
1515
1616install :
1717 - pip install -r requirements.txt
18+ - pip install -r requirements-dev.txt
1819
1920before_script :
2021 - make prepare
Original file line number Diff line number Diff line change 1+ tornado >= 5.0
2+ pytest-tornasync
Original file line number Diff line number Diff line change 1+ import os
2+ import sys
3+ from collections import namedtuple
4+ import pytest
5+ from rethinkdb import RethinkDB
6+ from rethinkdb .errors import ReqlRuntimeError
7+
8+ Helper = namedtuple ("Helper" , "r connection" )
9+
10+ INTEGRATION_TEST_DB = 'integration_test'
11+
12+
13+ @pytest .mark .integration
14+ @pytest .mark .skipif (sys .version_info < (3 , 6 ),
15+ reason = "requires python3.6 or higher" )
16+ async def test_tornado_connect ():
17+ """
18+ Test the flow for 3.6 and up, async generators are
19+ not supported in 3.5.
20+ """
21+
22+ r = RethinkDB ()
23+ r .set_loop_type ("tornado" )
24+
25+ connection = await r .connect (os .getenv ("REBIRTHDB_HOST" ))
26+ dbs = await r .db_list ().run (connection )
27+ assert isinstance (dbs , list )
28+ await connection .close ()
You can’t perform that action at this time.
0 commit comments