Skip to content

Commit

Permalink
Merge pull request arrow-py#283 from philiptzou/pull-request-exceptio…
Browse files Browse the repository at this point in the history
…n-message

Fix test errors caused by `Exception.message` which is removed since Python 3.0.
  • Loading branch information
andrewelkins committed Nov 24, 2015
2 parents 06198d4 + 2293d01 commit 96ad6ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
*.pyc
*.egg-info

# temporary files created by VIM
*.swp
*.swo

# temporary files created by git/patch
*.orig

.coverage
nosetests.xml

Expand Down
4 changes: 2 additions & 2 deletions tests/arrow_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1110,15 +1110,15 @@ 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):

get_tzinfo = arrow.Arrow._get_tzinfo

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):

Expand Down

0 comments on commit 96ad6ee

Please sign in to comment.