added tests for py36
This commit is contained in:
@@ -8,6 +8,7 @@ python:
|
||||
- '2.7'
|
||||
- 'pypy'
|
||||
- '3.5'
|
||||
- '3.6'
|
||||
|
||||
install:
|
||||
- pip install -e .
|
||||
|
||||
@@ -317,7 +317,7 @@ def load(routes='routes.py', app=None, data=None, rdict=None):
|
||||
|
||||
symbols = dict(app=app)
|
||||
try:
|
||||
exec(data + '\n', symbols)
|
||||
exec(data, symbols)
|
||||
except SyntaxError as e:
|
||||
logger.error(
|
||||
'%s has a syntax error and will not be loaded\n' % path
|
||||
|
||||
@@ -95,14 +95,14 @@ class TestRouter(unittest.TestCase):
|
||||
""" Test router syntax error """
|
||||
level = logger.getEffectiveLevel()
|
||||
logger.setLevel(logging.CRITICAL) # disable logging temporarily
|
||||
self.assertRaises(SyntaxError, load, data='x:y')
|
||||
self.assertRaises(SyntaxError, load, data='x::y')
|
||||
self.assertRaises(
|
||||
SyntaxError, load, rdict=dict(BASE=dict(badkey="value")))
|
||||
self.assertRaises(SyntaxError, load, rdict=dict(
|
||||
BASE=dict(), app=dict(default_application="name")))
|
||||
|
||||
self.myassertRaisesRegex(SyntaxError, "invalid syntax",
|
||||
load, data='x:y')
|
||||
load, data='x::y')
|
||||
self.myassertRaisesRegex(SyntaxError, "unknown key",
|
||||
load, rdict=dict(BASE=dict(badkey="value")))
|
||||
self.myassertRaisesRegex(SyntaxError, "BASE-only key",
|
||||
|
||||
Reference in New Issue
Block a user