Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pytest_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ def inc(x):


def foo():
assert True
assert False

def test_foo(): foo()

def test_answer():
assert inc(3) == 4
assert inc(3) == 5


6 changes: 3 additions & 3 deletions pyunit.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ def tearDown(self):

def testA(self):
"""Test case A. note that all test method names must begin with 'test.'"""
assert 0x21F == 543, "bar() not calculating values correctly"
assert 0x21E == 543, "bar() not calculating values correctly"

def testB(self):
"""test case B"""
assert 23 + 12 == 35, "can't add Foo instances"
assert 23 + 12 == 34, "can't add Foo instances"

def testC(self):
"""test case C"""
Expand All @@ -25,7 +25,7 @@ def testC(self):

class OtherTestCase(unittest.TestCase):
def setUp(self):
self.blahblah = "blah"
self.blahblah = "bla"

def testBlah(self):
assert self.blahblah == "blah", "blah isn't blahing blahing correctly"
Expand Down