From 384673ebdbacd8a4df2cd6dd39da26c7ab9753f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Sat, 15 Jul 2017 14:04:16 +0000 Subject: [PATCH 1/2] Run travis tests with python 3.5 & python 3.6. --- .travis.yml | 4 ++++ tox.ini | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8d00e01..887f235 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,10 @@ matrix: env: TOX_ENV=py33 - python: 3.4 env: TOX_ENV=py34 + - python: 3.5 + env: TOX_ENV=py35 + - python: 3.6 + env: TOX_ENV=py36 - python: 2.6 env: TOX_ENV=squeeze - python: 2.7 diff --git a/tox.ini b/tox.ini index 06d29de..5b8b90a 100755 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py33,py34,py35 +envlist = py27,py33,py34,py35,py36 [testenv] deps = From e3a8d0b93d71c42873a078d6691fb10c22118c95 Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Sun, 30 Jul 2017 22:22:52 +0200 Subject: [PATCH 2/2] fix db test with incorrect SQL id, that happened work with pre-3.6 dicts before --- isso/tests/test_db.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/isso/tests/test_db.py b/isso/tests/test_db.py index 3bfd498..54b9122 100644 --- a/isso/tests/test_db.py +++ b/isso/tests/test_db.py @@ -65,6 +65,7 @@ class TestDBMigration(unittest.TestCase): "supersecretkey") def test_limit_nested_comments(self): + """Transform previously A -> B -> C comment nesting to A -> B, A -> C""" tree = { 1: None, @@ -97,7 +98,7 @@ class TestDBMigration(unittest.TestCase): con.execute("INSERT INTO threads (uri, title) VALUES (?, ?)", ("/", "Test")) for (id, parent) in iteritems(tree): con.execute("INSERT INTO comments (" - " tid, parent, created)" + " id, parent, created)" "VALUEs (?, ?, ?)", (id, parent, id)) conf = config.new({ @@ -108,15 +109,15 @@ class TestDBMigration(unittest.TestCase): }) SQLite3(self.path, conf) - flattened = [ - (1, None), - (2, None), - (3, 2), - (4, 2), - (5, 2), - (6, None), - (7, 2) - ] + flattened = list(iteritems({ + 1: None, + 2: None, + 3: 2, + 4: 2, + 5: 2, + 6: None, + 7: 2 + })) with sqlite3.connect(self.path) as con: rv = con.execute("SELECT id, parent FROM comments ORDER BY created").fetchall()