From 32e17d4ab243a80b066392cdcfe2884b84a74d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonel=20C=C3=A2mara?= Date: Mon, 26 Feb 2018 18:47:59 +0000 Subject: [PATCH 1/3] fix config for coverage 4.5 changes --- gluon/tests/coverage.ini | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gluon/tests/coverage.ini b/gluon/tests/coverage.ini index 3c314b75..29020d93 100644 --- a/gluon/tests/coverage.ini +++ b/gluon/tests/coverage.ini @@ -5,6 +5,10 @@ source = gluon ## remove comment if you want applications coverage too #source = gluon, applications +omit = gluon/contrib/* + gluon/tests/* + gluon/packages/* + [report] # Regexes for lines to exclude from consideration exclude_lines = @@ -23,10 +27,5 @@ exclude_lines = if 0: if __name__ == .__main__.: -ignore_errors = True -omit = gluon/contrib/* - gluon/tests/* - gluon/packages/* - [html] directory = coverage_html_report From f40c041611c2a94a6b5e41e20b3326ec0dc065a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonel=20C=C3=A2mara?= Date: Mon, 26 Feb 2018 19:12:12 +0000 Subject: [PATCH 2/3] remove pg8000 --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 499cf4c2..1bb1f3b1 100644 --- a/setup.py +++ b/setup.py @@ -63,7 +63,6 @@ def start(): 'gluon/contrib/pymysql', 'gluon/contrib/pyrtf', 'gluon/contrib/pysimplesoap', - 'gluon/contrib/pg8000', 'gluon/contrib/plural_rules', 'gluon/contrib/minify', 'gluon/contrib/pyaes', From dfa6703420aeafa583f262c3cfccfef612c35b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonel=20C=C3=A2mara?= Date: Mon, 26 Feb 2018 19:59:21 +0000 Subject: [PATCH 3/3] test IS_EMPTY_OR with a list and tuple --- gluon/tests/test_validators.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gluon/tests/test_validators.py b/gluon/tests/test_validators.py index dd3cc0ff..7d66fa8e 100644 --- a/gluon/tests/test_validators.py +++ b/gluon/tests/test_validators.py @@ -861,6 +861,10 @@ class TestValidators(unittest.TestCase): self.assertEqual(rtn, [('', ''), ('id1', 'first label'), ('id2', 'second label')]) rtn = IS_EMPTY_OR(IS_IN_SET([('id1', 'first label'), ('id2', 'second label')], zero='zero')).options() self.assertEqual(rtn, [('', 'zero'), ('id1', 'first label'), ('id2', 'second label')]) + rtn = IS_EMPTY_OR((IS_LOWER(), IS_EMAIL()))('AAA') + self.assertEqual(rtn, ('aaa', 'Enter a valid email address')) + rtn = IS_EMPTY_OR([IS_LOWER(), IS_EMAIL()])('AAA') + self.assertEqual(rtn, ('aaa', 'Enter a valid email address')) def test_CLEANUP(self): rtn = CLEANUP()('helloò')