Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit 60c67b6

Browse files
committed
print error before assert
1 parent 1acba51 commit 60c67b6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

CloudFlare/tests/test_add.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ def test_add_invalid():
2727
assert False
2828
except CloudFlare.exceptions.CloudFlareAPIError as e:
2929
# error 7000 No route for that URI
30+
print('Error expected: %d=%s' % (int(e), str(e)), file=sys.stderr)
3031
assert int(e) == 7000
3132
assert str(e) == 'No route for that URI'
32-
print('Error expected: %d=%s' % (int(e), str(e)), file=sys.stderr)
3333

3434
def test_add_invalid_with_underscore():
3535
"""add API commands"""
@@ -40,9 +40,9 @@ def test_add_invalid_with_underscore():
4040
assert False
4141
except CloudFlare.exceptions.CloudFlareAPIError as e:
4242
# error 7000 No route for that URI
43+
print('Error expected: %d=%s' % (int(e), str(e)), file=sys.stderr)
4344
assert int(e) == 7000
4445
assert str(e) == 'No route for that URI'
45-
print('Error expected: %d=%s' % (int(e), str(e)), file=sys.stderr)
4646

4747
def test_add_invalid_with_dash():
4848
"""add API commands"""
@@ -53,9 +53,9 @@ def test_add_invalid_with_dash():
5353
assert False
5454
except CloudFlare.exceptions.CloudFlareAPIError as e:
5555
# error 7000 No route for that URI
56+
print('Error expected: %d=%s' % (int(e), str(e)), file=sys.stderr)
5657
assert int(e) == 7000
5758
assert str(e) == 'No route for that URI'
58-
print('Error expected: %d=%s' % (int(e), str(e)), file=sys.stderr)
5959

6060
if __name__ == '__main__':
6161
test_cloudflare(debug=True)

0 commit comments

Comments
 (0)