]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Some small fixes from #19
authorArmin Ronacher <armin.ronacher@active-4.com>
Sat, 6 Jul 2013 14:49:29 +0000 (16:49 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Sat, 6 Jul 2013 14:49:29 +0000 (16:49 +0200)
tests/messages/test_frontend.py
tests/test_core.py
tests/test_numbers.py

index 88315fbcb1480296b425ce2d863f873d6f5ab6ea..9cce4b72d727f9247a53bc6103080bbea60b310f 100644 (file)
@@ -733,7 +733,7 @@ pybabel: error: no valid command or option passed. try the -h/--help option for
         try:
             self.cli.run(sys.argv + ['--help'])
             self.fail('Expected SystemExit')
-        except SystemExit, e:
+        except SystemExit as e:
             self.assertEqual(0, e.code)
             self.assertEqual("""\
 usage: pybabel command [options] [args]
index 9341ca8b4156b687f90fca6ad110cf54cbbf1b82..224ebc83949d45254475ab9e6d08867d60ce71c9 100644 (file)
@@ -233,7 +233,7 @@ def test_parse_locale():
 
     with pytest.raises(ValueError) as excinfo:
         core.parse_locale('not_a_LOCALE_String')
-    assert (excinfo.value.message ==
+    assert (excinfo.value.args[0] ==
             "'not_a_LOCALE_String' is not a valid locale identifier")
 
     assert core.parse_locale('it_IT@euro') == ('it', 'IT', None, None)
index 9a0caf2d417bbb977f2323fca8ea2a535b2687b8..718ed69dfe1cfc0bcd0a9828125e608738bab334 100644 (file)
@@ -247,7 +247,7 @@ def test_parse_number():
 
     with pytest.raises(numbers.NumberFormatError) as excinfo:
         numbers.parse_number('1.099,98', locale='de')
-    assert excinfo.value.message == "'1.099,98' is not a valid number"
+    assert excinfo.value.args[0] == "'1.099,98' is not a valid number"
 
 
 def test_parse_decimal():
@@ -257,7 +257,7 @@ def test_parse_decimal():
 
     with pytest.raises(numbers.NumberFormatError) as excinfo:
         numbers.parse_decimal('2,109,998', locale='de')
-    assert excinfo.value.message == "'2,109,998' is not a valid decimal number"
+    assert excinfo.value.args[0] == "'2,109,998' is not a valid decimal number"
 
 
 def test_bankersround():