Skip to content

Commit

Permalink
Merge pull request beeware#319 from henriquebraga/master
Browse files Browse the repository at this point in the history
Fixed test_endswith tests (passing wrong variable name)
  • Loading branch information
glasnt authored Feb 22, 2017
2 parents 90de6da + 602c141 commit 95895ee
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions tests/datatypes/test_str.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,31 @@ def test_setattr(self):
def test_endswith(self):
self.assertCodeExecution("""
s = "abracadabra"
end = "abra"
print(s.endswith(end))
suffix = "abra"
print(s.endswith(suffix))
""")

self.assertCodeExecution("""
s = "abracadabra"
end = "ABRA"
print(s.endswith(end))
suffix = "ABRA"
print(s.endswith(suffix))
""")

self.assertCodeExecution("""
s = "ABRACADABRA"
end = "abra"
print(s.endswith(end))
suffix = "abra"
print(s.endswith(suffix))
""")

# self.assertCodeExecution("""
# print('abracadabra'.endswith('abra'))
# """)
self.assertCodeExecution("""
print('abracadabra'.endswith('abra'))
""")

self.assertCodeExecution("""
s = "ABRACADABRA"
suffix = ""
print(s.endswith(suffix))
""")

def test_getattr(self):
self.assertCodeExecution("""
Expand Down

0 comments on commit 95895ee

Please sign in to comment.