test: Remove unneeded custom __eq__ methods.
This commit is contained in:
parent
7d97d54f6c
commit
2a34366d2c
@ -36,13 +36,6 @@ class Font(QFont):
|
|||||||
self.family(), self.pointSize(), self.weight(),
|
self.family(), self.pointSize(), self.weight(),
|
||||||
self.style() & QFont.StyleItalic)
|
self.style() & QFont.StyleItalic)
|
||||||
|
|
||||||
def __eq__(self, other):
|
|
||||||
"""The default operator= of QFont seems to be rather strict."""
|
|
||||||
return (self.family() == other.family() and
|
|
||||||
self.pointSize() == other.pointSize() and
|
|
||||||
self.weight() == other.weight() and
|
|
||||||
self.style() == other.style())
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def fromdesc(cls, desc):
|
def fromdesc(cls, desc):
|
||||||
"""Get a Font based on a font description."""
|
"""Get a Font based on a font description."""
|
||||||
|
@ -42,13 +42,6 @@ class Color(QColor):
|
|||||||
return 'Color({}, {}, {}, {})'.format(
|
return 'Color({}, {}, {}, {})'.format(
|
||||||
self.red(), self.green(), self.blue(), self.alpha())
|
self.red(), self.green(), self.blue(), self.alpha())
|
||||||
|
|
||||||
def __eq__(self, other):
|
|
||||||
"""The default operator= of QColor seems to be rather strict."""
|
|
||||||
return (self.red() == other.red() and
|
|
||||||
self.green() == other.green() and
|
|
||||||
self.blue() == other.blue() and
|
|
||||||
self.alpha() == other.alpha())
|
|
||||||
|
|
||||||
|
|
||||||
class ElidingTests(unittest.TestCase):
|
class ElidingTests(unittest.TestCase):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user