add more asserts:
This commit is contained in:
parent
a3479b618d
commit
5d5bd57f10
5
tests.py
5
tests.py
|
@ -3,9 +3,6 @@ from glue import glue
|
||||||
|
|
||||||
|
|
||||||
class GlueTests(unittest.TestCase):
|
class GlueTests(unittest.TestCase):
|
||||||
def setUp(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def test_tuple(self):
|
def test_tuple(self):
|
||||||
output = glue("why", "would", "you", "run", "these", "tests")
|
output = glue("why", "would", "you", "run", "these", "tests")
|
||||||
|
@ -14,11 +11,13 @@ class GlueTests(unittest.TestCase):
|
||||||
def test_tuple_and_named(self):
|
def test_tuple_and_named(self):
|
||||||
output = glue("why", "would", "you", "run", "these", "tests", who="bozo")
|
output = glue("why", "would", "you", "run", "these", "tests", who="bozo")
|
||||||
assert output == "why would you run these tests bozo"
|
assert output == "why would you run these tests bozo"
|
||||||
|
assert "who" not in output
|
||||||
|
|
||||||
def test_named(self):
|
def test_named(self):
|
||||||
output = glue(what="bozo", who="clown")
|
output = glue(what="bozo", who="clown")
|
||||||
print output
|
print output
|
||||||
assert output == "bozo clown"
|
assert output == "bozo clown"
|
||||||
|
assert "what" not in output
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user