Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(248971)

Delta Between Two Patch Sets: Lib/test/test_binop.py

Issue 16510: Using appropriate checks in tests
Left Patch Set: Created 5 years, 9 months ago
Right Patch Set: Created 5 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/test/test_augassign.py ('k') | Lib/test/test_bisect.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 """Tests for binary operators on subtypes of built-in types.""" 1 """Tests for binary operators on subtypes of built-in types."""
2 2
3 import unittest 3 import unittest
4 from test import support 4 from test import support
5 from operator import eq, ne, lt, gt, le, ge 5 from operator import eq, ne, lt, gt, le, ge
6 6
7 def gcd(a, b): 7 def gcd(a, b):
8 """Greatest common divisor using Euclid's algorithm.""" 8 """Greatest common divisor using Euclid's algorithm."""
9 while a: 9 while a:
10 a, b = b%a, a 10 a, b = b%a, a
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 self.assertEqual(op_sequence(le, A, B), ['A.__le__', 'B.__ge__']) 371 self.assertEqual(op_sequence(le, A, B), ['A.__le__', 'B.__ge__'])
372 self.assertEqual(op_sequence(le, B, A), ['B.__le__', 'A.__ge__']) 372 self.assertEqual(op_sequence(le, B, A), ['B.__le__', 'A.__ge__'])
373 self.assertEqual(op_sequence(le, B, C), ['C.__ge__', 'B.__le__']) 373 self.assertEqual(op_sequence(le, B, C), ['C.__ge__', 'B.__le__'])
374 self.assertEqual(op_sequence(le, C, B), ['C.__le__', 'B.__ge__']) 374 self.assertEqual(op_sequence(le, C, B), ['C.__le__', 'B.__ge__'])
375 375
376 def test_main(): 376 def test_main():
377 support.run_unittest(RatTestCase, OperationOrderTests) 377 support.run_unittest(RatTestCase, OperationOrderTests)
378 378
379 if __name__ == "__main__": 379 if __name__ == "__main__":
380 test_main() 380 test_main()
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+