Run travis tests with python 3.5 & python 3.6
This commit is contained in:
commit
c72946dc14
@ -11,6 +11,10 @@ matrix:
|
|||||||
env: TOX_ENV=py33
|
env: TOX_ENV=py33
|
||||||
- python: 3.4
|
- python: 3.4
|
||||||
env: TOX_ENV=py34
|
env: TOX_ENV=py34
|
||||||
|
- python: 3.5
|
||||||
|
env: TOX_ENV=py35
|
||||||
|
- python: 3.6
|
||||||
|
env: TOX_ENV=py36
|
||||||
- python: 2.6
|
- python: 2.6
|
||||||
env: TOX_ENV=squeeze
|
env: TOX_ENV=squeeze
|
||||||
- python: 2.7
|
- python: 2.7
|
||||||
|
@ -65,6 +65,7 @@ class TestDBMigration(unittest.TestCase):
|
|||||||
"supersecretkey")
|
"supersecretkey")
|
||||||
|
|
||||||
def test_limit_nested_comments(self):
|
def test_limit_nested_comments(self):
|
||||||
|
"""Transform previously A -> B -> C comment nesting to A -> B, A -> C"""
|
||||||
|
|
||||||
tree = {
|
tree = {
|
||||||
1: None,
|
1: None,
|
||||||
@ -97,7 +98,7 @@ class TestDBMigration(unittest.TestCase):
|
|||||||
con.execute("INSERT INTO threads (uri, title) VALUES (?, ?)", ("/", "Test"))
|
con.execute("INSERT INTO threads (uri, title) VALUES (?, ?)", ("/", "Test"))
|
||||||
for (id, parent) in iteritems(tree):
|
for (id, parent) in iteritems(tree):
|
||||||
con.execute("INSERT INTO comments ("
|
con.execute("INSERT INTO comments ("
|
||||||
" tid, parent, created)"
|
" id, parent, created)"
|
||||||
"VALUEs (?, ?, ?)", (id, parent, id))
|
"VALUEs (?, ?, ?)", (id, parent, id))
|
||||||
|
|
||||||
conf = config.new({
|
conf = config.new({
|
||||||
@ -108,15 +109,15 @@ class TestDBMigration(unittest.TestCase):
|
|||||||
})
|
})
|
||||||
SQLite3(self.path, conf)
|
SQLite3(self.path, conf)
|
||||||
|
|
||||||
flattened = [
|
flattened = list(iteritems({
|
||||||
(1, None),
|
1: None,
|
||||||
(2, None),
|
2: None,
|
||||||
(3, 2),
|
3: 2,
|
||||||
(4, 2),
|
4: 2,
|
||||||
(5, 2),
|
5: 2,
|
||||||
(6, None),
|
6: None,
|
||||||
(7, 2)
|
7: 2
|
||||||
]
|
}))
|
||||||
|
|
||||||
with sqlite3.connect(self.path) as con:
|
with sqlite3.connect(self.path) as con:
|
||||||
rv = con.execute("SELECT id, parent FROM comments ORDER BY created").fetchall()
|
rv = con.execute("SELECT id, parent FROM comments ORDER BY created").fetchall()
|
||||||
|
Loading…
Reference in New Issue
Block a user