code: def test_abstract_class_attribute():
      class A(eqx.Module):
          x: AbstractClassVar[bool]
  
      assert A.__abstractvars__ == frozenset()
      assert A.__abstractclassvars__ == frozenset({"x"})
  
      with pytest.raises(TypeError, match="abstract class attributes"):
          A()
  
      class B(A):
          y: int
  
      assert B.__abstractvars__ == frozenset()
      assert B.__abstractclassvars__ == frozenset({"x"})
  
      with pytest.raises(TypeError, match="abstract class attributes"):
          B(y=2)
  
      with pytest.raises(TypeError, match="unsubscripted"):
  
          class C(eqx.Module):
              x: AbstractClassVar
  
      class D(A):
          x: AbstractClassVar[bool]
  
      assert D.__abstractvars__ == frozenset()
      assert D.__abstractclassvars__ == frozenset({"x"})
  
      class E(A):
          x: ClassVar[bool]
  
      assert E.__abstractvars__ == frozenset()
      assert E.__abstractclassvars__ == frozenset()
  
      with pytest.raises(TypeError, match="cannot have value"):
  
          class F(eqx.Module):
              x: AbstractClassVar[bool] = True
  
      class G(A):
          x = True
          y: bool = False
  
      assert G.__abstractvars__ == frozenset()
      assert G.__abstractclassvars__ == frozenset()
  
      class H(A):
          x = True
  
      assert H.__abstractvars__ == frozenset()
      assert H.__abstractclassvars__ == frozenset()
  
      class I(A):  # noqa: E742
          x: AbstractVar[bool]
  
      assert I.__abstractvars__ == frozenset()
      assert I.__abstractclassvars__ == frozenset({"x"})
  
file_path: equinox/tests/test_abstract.py
imports: import abc
  from typing import ClassVar, TYPE_CHECKING
  import equinox
  import pytest
label_desc: Use image node_id 4 for calling a global function with example usage: test_abstract_class_attribute() without return types