mirror of
https://github.com/python/cpython.git
synced 2025-10-15 03:10:29 +00:00
bpo-37685: Fixed __eq__, __lt__ etc implementations in some classes. (GH-14952)
They now return NotImplemented for unsupported type of the other operand.
This commit is contained in:
parent
4c69be22df
commit
662db125cd
23 changed files with 1295 additions and 1150 deletions
|
@ -1,7 +1,7 @@
|
|||
import unittest
|
||||
import tkinter
|
||||
from tkinter import font
|
||||
from test.support import requires, run_unittest, gc_collect
|
||||
from test.support import requires, run_unittest, gc_collect, ALWAYS_EQ
|
||||
from tkinter.test.support import AbstractTkTest
|
||||
|
||||
requires('gui')
|
||||
|
@ -70,6 +70,7 @@ class FontTest(AbstractTkTest, unittest.TestCase):
|
|||
self.assertEqual(font1, font2)
|
||||
self.assertNotEqual(font1, font1.copy())
|
||||
self.assertNotEqual(font1, 0)
|
||||
self.assertEqual(font1, ALWAYS_EQ)
|
||||
|
||||
def test_measure(self):
|
||||
self.assertIsInstance(self.font.measure('abc'), int)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue