summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2012-01-03 18:47:03 +0000
committerGiampaolo Rodola <g.rodola@gmail.com>2012-01-03 18:47:03 +0000
commit4b31d37b59949c2f375b05e39f75d33fc714a544 (patch)
tree57f9c6efbc6bd37fa8ffea058d4c646b228da3e4
parentd2b73d0cbd78f967095eee1416b22b3501fdad7b (diff)
downloadpysendfile-4b31d37b59949c2f375b05e39f75d33fc714a544.tar.gz
use plain assert statement instead of assertTrue when testing for <= comparisons
-rw-r--r--test/test_sendfile.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/test_sendfile.py b/test/test_sendfile.py
index 617a306..10af5df 100644
--- a/test/test_sendfile.py
+++ b/test/test_sendfile.py
@@ -193,7 +193,7 @@ class TestSendfile(unittest.TestCase):
break
total_sent += sent
offset += sent
- self.assertTrue(sent <= nbytes)
+ assert sent <= nbytes, (sent, nbytes)
self.assertEqual(offset, total_sent)
self.assertEqual(total_sent, len(DATA))
@@ -215,7 +215,7 @@ class TestSendfile(unittest.TestCase):
break
total_sent += sent
offset += sent
- self.assertTrue(sent <= nbytes)
+ assert sent <= nbytes, (sent, nbytes)
self.client.close()
if "sunos" in sys.platform:
@@ -468,7 +468,7 @@ class TestLargeFile(unittest.TestCase):
break
total_sent += sent
offset += sent
- self.assertTrue(sent <= nbytes)
+ assert sent <= nbytes, (sent, nbytes)
self.assertEqual(offset, total_sent)
except:
print
@@ -528,4 +528,3 @@ def test_main():
if __name__ == '__main__':
test_main()
-