Enable ruff on several more files in Lib/test (#110929)

This commit is contained in:
Alex Waygood 2023-10-16 15:57:01 +01:00 committed by GitHub
parent a1ac5590e0
commit 02d26c4bef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 21 deletions

View file

@ -230,7 +230,7 @@ class Test(unittest.TestCase):
super().__init__(name, bases, namespace)
with self.assertRaises(TypeError):
class MyClass(metaclass=MyMeta, otherarg=1):
class MyClass2(metaclass=MyMeta, otherarg=1):
pass
class MyMeta(type):
@ -241,10 +241,10 @@ class Test(unittest.TestCase):
super().__init__(name, bases, namespace)
self.otherarg = otherarg
class MyClass(metaclass=MyMeta, otherarg=1):
class MyClass3(metaclass=MyMeta, otherarg=1):
pass
self.assertEqual(MyClass.otherarg, 1)
self.assertEqual(MyClass3.otherarg, 1)
def test_errors_changed_pep487(self):
# These tests failed before Python 3.6, PEP 487
@ -263,10 +263,10 @@ class Test(unittest.TestCase):
self.otherarg = otherarg
return self
class MyClass(metaclass=MyMeta, otherarg=1):
class MyClass2(metaclass=MyMeta, otherarg=1):
pass
self.assertEqual(MyClass.otherarg, 1)
self.assertEqual(MyClass2.otherarg, 1)
def test_type(self):
t = type('NewClass', (object,), {})