[3.12] Enable ruff on several more files in Lib/test (#110929) (#110934)

(cherry-picked from commit 02d26c4bef)
This commit is contained in:
Alex Waygood 2023-10-16 16:48:02 +01:00 committed by GitHub
parent 89f9c226a1
commit b8e5b1b28a
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,), {})