From: Hugo Date: Thu, 28 Dec 2017 09:13:50 +0000 (+0200) Subject: Replace comparison with None with equality operator X-Git-Tag: v2.6.0~13^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05974ff14feda12a0d292a560313961796e69113;p=thirdparty%2Fbabel.git Replace comparison with None with equality operator --- diff --git a/tests/test_localedata.py b/tests/test_localedata.py index 3599b215..5d6c8008 100644 --- a/tests/test_localedata.py +++ b/tests/test_localedata.py @@ -108,12 +108,12 @@ def test_pi_support_not_frozen(): def test_locale_argument_acceptance(): # Testing None input. normalized_locale = localedata.normalize_locale(None) - assert normalized_locale == None + assert normalized_locale is None locale_exist = localedata.exists(None) assert locale_exist == False # # Testing list input. normalized_locale = localedata.normalize_locale(['en_us', None]) - assert normalized_locale == None + assert normalized_locale is None locale_exist = localedata.exists(['en_us', None]) assert locale_exist == False diff --git a/tests/test_numbers.py b/tests/test_numbers.py index 6cc6e438..2795b0f4 100644 --- a/tests/test_numbers.py +++ b/tests/test_numbers.py @@ -206,13 +206,13 @@ def test_is_currency(): def test_normalize_currency(): assert normalize_currency('EUR') == 'EUR' assert normalize_currency('eUr') == 'EUR' - assert normalize_currency('FUU') == None - assert normalize_currency('') == None - assert normalize_currency(None) == None - assert normalize_currency(' EUR ') == None - assert normalize_currency(' ') == None - assert normalize_currency([]) == None - assert normalize_currency(set()) == None + assert normalize_currency('FUU') is None + assert normalize_currency('') is None + assert normalize_currency(None) is None + assert normalize_currency(' EUR ') is None + assert normalize_currency(' ') is None + assert normalize_currency([]) is None + assert normalize_currency(set()) is None def test_get_currency_name():