From: Jeremy Schlatter Date: Wed, 22 Oct 2014 01:45:08 +0000 (-0700) Subject: remove spaces before function calls X-Git-Tag: v0.4.22~1^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=def30a3ec69e34c6a9f6be4442df02625457ad28;p=flanker.git remove spaces before function calls --- diff --git a/tests/addresslib/address_test.py b/tests/addresslib/address_test.py index 969e7a4..e35aa16 100644 --- a/tests/addresslib/address_test.py +++ b/tests/addresslib/address_test.py @@ -12,15 +12,15 @@ def test_addr_properties(): url = parse('http://host.com') non_ascii = parse(u'Gonzalo Bañuelos') - eq_ (False, url.supports_routing) - eq_ (True, email.supports_routing) + eq_(False, url.supports_routing) + eq_(True, email.supports_routing) eq_(Address.Type.Email, email.addr_type) eq_(Address.Type.Url, url.addr_type) eq_(non_ascii, "gonz@host.com") adr = parse("Zeka ") - eq_ (str(adr), 'EV@host.com') + eq_(str(adr), 'EV@host.com') def test_address_compare(): @@ -35,16 +35,16 @@ def test_address_compare(): ok_(a != b) u = UrlAddress("http://hello.com") - ok_ (u == "http://hello.com") + ok_(u == "http://hello.com") # make sure it works for sets: s = set() s.add(a) s.add(also_a) - eq_ (1, len(s)) + eq_(1, len(s)) s.add(u) s.add(u) - eq_ (2, len(s)) + eq_(2, len(s)) def test_local_url(): @@ -54,56 +54,56 @@ def test_local_url(): def test_addresslist_basics(): lst = parse_list("http://foo.com:1000; Biz@Kontsevoy.Com ") - eq_ (2, len(lst)) - eq_ ("http", lst[0].scheme) - eq_ ("kontsevoy.com", lst[1].hostname) - eq_ ("Biz", lst[1].mailbox) - ok_ ("biz@kontsevoy.com" in lst) + eq_(2, len(lst)) + eq_("http", lst[0].scheme) + eq_("kontsevoy.com", lst[1].hostname) + eq_("Biz", lst[1].mailbox) + ok_("biz@kontsevoy.com" in lst) # test case-sensitivity: hostname must be lowercased, but the local-part needs # to remain case-sensitive - ok_ ("Biz@kontsevoy.com" in str(lst)) + ok_("Biz@kontsevoy.com" in str(lst)) # check parsing: spec = '''http://foo.com:8080, "Ev K." , "Alex K" alex@yahoo.net; "Tom, S" "tom+[a]"@s.com''' lst = parse_list(spec, True) - eq_ (len(lst), 4) - eq_ ("http://foo.com:8080", lst[0].address) - eq_ ("ev@host.com", lst[1].address) - eq_ ("alex@yahoo.net", lst[2].address) - eq_ ('"tom+[a]"@s.com', lst[3].address) + eq_(len(lst), 4) + eq_("http://foo.com:8080", lst[0].address) + eq_("ev@host.com", lst[1].address) + eq_("alex@yahoo.net", lst[2].address) + eq_('"tom+[a]"@s.com', lst[3].address) # string-based persistence: s = str(lst) clone = parse_list(s) - eq_ (lst, clone) + eq_(lst, clone) # now clone using full spec: s = lst.full_spec() clone = parse_list(s) - eq_ (lst, clone) + eq_(lst, clone) # hostnames: - eq_ (set(['host.com', 'foo.com', 'yahoo.net', 's.com']), lst.hostnames) - eq_ (set(['url', 'email']), lst.addr_types) + eq_(set(['host.com', 'foo.com', 'yahoo.net', 's.com']), lst.hostnames) + eq_(set(['url', 'email']), lst.addr_types) # add: result = lst + parse_list("ev@local.net") + ["foo@bar.com"] - ok_ (isinstance(result, AddressList)) - eq_ (len(result), len(lst)+2) - ok_ ("foo@bar.com" in result) + ok_(isinstance(result, AddressList)) + eq_(len(result), len(lst)+2) + ok_("foo@bar.com" in result) def test_addresslist_with_apostrophe(): s = '''"Allan G\'o" , "Os Wi" ''' lst = parse_list(s) - eq_ (2, len(lst)) - eq_ ('Allan G\'o ', lst[0].full_spec()) - eq_ ('Os Wi ', lst[1].full_spec()) + eq_(2, len(lst)) + eq_('Allan G\'o ', lst[0].full_spec()) + eq_('Os Wi ', lst[1].full_spec()) lst = parse_list("=?UTF-8?Q?Eugueny_=CF=8E_Kontsevoy?= ") - eq_ ('=?utf-8?q?Eugueny_=CF=8E_Kontsevoy?= ', lst.full_spec()) - eq_ (u'Eugueny ώ Kontsevoy', lst[0].display_name) + eq_('=?utf-8?q?Eugueny_=CF=8E_Kontsevoy?= ', lst.full_spec()) + eq_(u'Eugueny ώ Kontsevoy', lst[0].display_name) def test_edge_cases():