bpo-33985: Implement ContextVar.name attribute. (GH-7980)

(cherry picked from commit 41cb0baea96a80360971908a0bd79d9d40dd5e44)

Co-authored-by: Yury Selivanov <yury@magic.io>
diff --git a/Lib/test/test_context.py b/Lib/test/test_context.py
index 74d05fc..efd7319 100644
--- a/Lib/test/test_context.py
+++ b/Lib/test/test_context.py
@@ -30,8 +30,13 @@
         with self.assertRaisesRegex(TypeError, 'must be a str'):
             contextvars.ContextVar(1)
 
-        c = contextvars.ContextVar('a')
-        self.assertNotEqual(hash(c), hash('a'))
+        c = contextvars.ContextVar('aaa')
+        self.assertEqual(c.name, 'aaa')
+
+        with self.assertRaises(AttributeError):
+            c.name = 'bbb'
+
+        self.assertNotEqual(hash(c), hash('aaa'))
 
     def test_context_var_new_2(self):
         self.assertIsNone(contextvars.ContextVar[int])