Skip to content

Commit

Permalink
[QA] Prefer '' for string quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
JNRowe committed Jul 29, 2018
1 parent 1fa3f50 commit a204346
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tests/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test__isbn_cleanse_isbn(isbn):
unicodedata.lookup('HORIZONTAL BAR').join(['978', '0199564095']),
])
def test__isbn_cleanse_unicode_dash(isbn):
assert _isbn_cleanse(isbn) == "".join(filter(lambda s: s.isdigit(), isbn))
assert _isbn_cleanse(isbn) == ''.join(filter(lambda s: s.isdigit(), isbn))


@mark.parametrize('isbn', [
Expand All @@ -60,7 +60,7 @@ def test__isbn_cleanse_reflect_type(isbn):


def test__isbn_cleanse_invalid_type():
with raises(TypeError, match="ISBN must be a string, received 2"):
with raises(TypeError, match='ISBN must be a string, received 2'):
_isbn_cleanse(2)


Expand Down
6 changes: 3 additions & 3 deletions tests/test_isbn.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test___str__(isbn):


@mark.skipif(version_info < (2, 6),
reason="format() not supported with this Python version")
reason='format() not supported with this Python version')
@mark.parametrize('isbn,format_spec,result',
[(s, '', 'ISBN %s' % s) for s in TEST_ISBNS] + [
('9780521871723', '', 'ISBN 9780521871723'),
Expand Down Expand Up @@ -107,7 +107,7 @@ def test_to_url(country, result):


def test_to_url_invalid_country():
with raises(CountryError, match="zh"):
with raises(CountryError, match='zh'):
Isbn('0071148167').to_url(country='zh')


Expand All @@ -126,7 +126,7 @@ def test_to_url_site(site, result):


def test_to_url_invalid_site():
with raises(SiteError, match="nosite"):
with raises(SiteError, match='nosite'):
Isbn('0071148167').to_url(site='nosite')


Expand Down
2 changes: 1 addition & 1 deletion tests/test_regressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
unicodedata.lookup('HORIZONTAL BAR').join(['978', '0199564095']),
])
def test_issue_7_unistr(isbn):
assert _isbn_cleanse(isbn) == "".join(filter(lambda s: s.isdigit(), isbn))
assert _isbn_cleanse(isbn) == ''.join(filter(lambda s: s.isdigit(), isbn))
2 changes: 1 addition & 1 deletion tests/test_sbn.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

@mark.parametrize('sbn', [s[1:] for s in TEST_ISBN10S] + ['521871723', ])
def test___repr__(sbn):
assert repr(Sbn(sbn)) == "Sbn(%r)" % sbn
assert repr(Sbn(sbn)) == 'Sbn(%r)' % sbn


@mark.parametrize('sbn,result', [
Expand Down

0 comments on commit a204346

Please sign in to comment.