From 2293d01942562c6f72c9e94abc6e11ffcf597723 Mon Sep 17 00:00:00 2001 From: Philip Tzou Date: Mon, 23 Nov 2015 21:14:37 -0800 Subject: [PATCH] Fix test errors caused by `Exception.message` which is removed since Python 3.0. --- .gitignore | 7 +++++++ tests/arrow_tests.py | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d7a8c545f..b40947c22 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,13 @@ *.pyc *.egg-info +# temporary files created by VIM +*.swp +*.swo + +# temporary files created by git/patch +*.orig + .coverage nosetests.xml diff --git a/tests/arrow_tests.py b/tests/arrow_tests.py index ea4a0841f..508fe3ec4 100644 --- a/tests/arrow_tests.py +++ b/tests/arrow_tests.py @@ -1110,7 +1110,7 @@ def test_get_datetime(self): with assertRaises(ValueError) as raise_ctx: get_datetime('abc') - assertFalse('{0}' in raise_ctx.exception.message) + assertFalse('{0}' in str(raise_ctx.exception)) def test_get_tzinfo(self): @@ -1118,7 +1118,7 @@ def test_get_tzinfo(self): with assertRaises(ValueError) as raise_ctx: get_tzinfo('abc') - assertFalse('{0}' in raise_ctx.exception.message) + assertFalse('{0}' in str(raise_ctx.exception)) def test_get_timestamp_from_input(self):