File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -859,12 +859,14 @@ def __init__(self, arg):
859
859
860
860
from _testinternalcapi import has_inline_values
861
861
862
- Py_TPFLAGS_MANAGED_DICT = (1 << 2 )
862
+ Py_TPFLAGS_MANAGED_DICT = (1 << 4 )
863
+
864
+ class NoManagedDict :
865
+ __slots__ = ('a' ,)
863
866
864
867
class Plain :
865
868
pass
866
869
867
-
868
870
class WithAttrs :
869
871
870
872
def __init__ (self ):
@@ -873,6 +875,13 @@ def __init__(self):
873
875
self .c = 3
874
876
self .d = 4
875
877
878
+ class TestNoManagedValues (unittest .TestCase ):
879
+ def test_flags (self ):
880
+ self .assertEqual (NoManagedDict .__flags__ & Py_TPFLAGS_MANAGED_DICT , 0 )
881
+
882
+ def test_no_inline_values_for_slots_class (self ):
883
+ c = NoManagedDict ()
884
+ self .assertFalse (has_inline_values (c ))
876
885
877
886
class TestInlineValues (unittest .TestCase ):
878
887
You can’t perform that action at this time.
0 commit comments