PY-49650 Add a regression test

GitOrigin-RevId: d2ef9aa4b20905e95617d07e0483fdb34aa82444
This commit is contained in:
Mikhail Golubev
2025-07-10 14:58:22 +00:00
committed by intellij-monorepo-bot
parent d358ceb18a
commit db7d4fd9cb
4 changed files with 63 additions and 1 deletions
@@ -0,0 +1,27 @@
# encoding: utf-8
# module mod
# from mod.py
# by generator 1000.0
# no doc
# no imports
# no functions
# classes
class C(object):
# no doc
@staticmethod
def m(): # reliably restored by inspect
# no doc
pass
def __init__(self, *args, **kwargs): # real signature unknown
pass
__weakref__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""list of weak references to the object (if defined)"""
__dict__ = None # (!) real value is ''
@@ -0,0 +1,27 @@
# encoding: utf-8
# module mod
# from mod.py
# by generator 1000.0
# no doc
# no imports
# no functions
# classes
class C(object):
# no doc
@staticmethod
def m(): # reliably restored by inspect
# no doc
pass
def __init__(self, *args, **kwargs): # real signature unknown
pass
__weakref__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""list of weak references to the object (if defined)"""
__dict__ = None # (!) real value is ''
@@ -0,0 +1,4 @@
class C:
@staticmethod
def m():
pass
@@ -351,6 +351,10 @@ class SkeletonGenerationTest(FunctionalGeneratorTestCase):
def test_module_attributes_with_illegal_names_are_skipped(self):
self.check_generator_output('mod', 'mod.py')
# PY-49650
def test_static_method(self):
self.check_generator_output('mod', 'mod.py')
class MultiModuleGenerationTest(FunctionalGeneratorTestCase):
default_generator_extra_args = ['--name-pattern', 'mod?']
@@ -592,4 +596,4 @@ class StatePassingGenerationTest(FunctionalGeneratorTestCase):
'--state-file', self.resolve_in_test_data('.state.json'),
'--name-pattern', 'mod*',
],
)
)