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

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

Issue 25958: Implicit ABCs have no means of "anti-registration"
Left Patch Set: Created 3 years, 7 months ago
Right Patch Set: Created 3 years, 7 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_bool.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, le 5 from operator import eq, le, ne
6 from abc import ABCMeta 6 from abc import ABCMeta
7 7
8 def gcd(a, b): 8 def gcd(a, b):
9 """Greatest common divisor using Euclid's algorithm.""" 9 """Greatest common divisor using Euclid's algorithm."""
10 while a: 10 while a:
11 a, b = b%a, a 11 a, b = b%a, a
12 return b 12 return b
13 13
14 def isint(x): 14 def isint(x):
15 """Test whether an object is an instance of int.""" 15 """Test whether an object is an instance of int."""
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 def test_fallback_ne_blocking(self): 432 def test_fallback_ne_blocking(self):
433 e, sn, xn = SupEq(), SN(), XN() 433 e, sn, xn = SupEq(), SN(), XN()
434 self.assertFalse(e != e) 434 self.assertFalse(e != e)
435 self.assertRaises(TypeError, ne, e, sn) 435 self.assertRaises(TypeError, ne, e, sn)
436 self.assertRaises(TypeError, ne, sn, e) 436 self.assertRaises(TypeError, ne, sn, e)
437 self.assertFalse(e != xn) 437 self.assertFalse(e != xn)
438 self.assertRaises(TypeError, ne, xn, e) 438 self.assertRaises(TypeError, ne, xn, e)
439 439
440 if __name__ == "__main__": 440 if __name__ == "__main__":
441 unittest.main() 441 unittest.main()
LEFTRIGHT

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