Add assert_startswith/endswith helper functions
This commit is contained in:
parent
fa601b8111
commit
60dea38d10
6 changed files with 23 additions and 17 deletions
|
@ -19,7 +19,7 @@ class TestPyLastLibrary(PyLastTestCase):
|
|||
representation = repr(library)
|
||||
|
||||
# Assert
|
||||
self.assertTrue(representation.startswith("pylast.Library("))
|
||||
self.assert_startswith(representation, "pylast.Library(")
|
||||
|
||||
def test_str(self):
|
||||
# Arrange
|
||||
|
@ -29,7 +29,7 @@ class TestPyLastLibrary(PyLastTestCase):
|
|||
string = str(library)
|
||||
|
||||
# Assert
|
||||
self.assertTrue(string.endswith("'s Library"))
|
||||
self.assert_endswith(string, "'s Library")
|
||||
|
||||
def test_library_is_hashable(self):
|
||||
# Arrange
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue