mirror of https://github.com/pulumi/pulumi.git
![]() Fixes https://github.com/pulumi/pulumi/issues/18478 At some point python SDKs started using an `__internal_init__` method as part of generated resource constructors. This changed the expected height of user code in the stack traces we grab for setting `sourcePosition` and our tests never picked this up because they used a handwritten SDK that only had an `__init__` method. This updates the test so that one resource has an `__internal_init__` that is called by `__init__` and then fixes `get_source_position` so it can handle both cases. It does this by looking up the stack for the third `__init__` call and then picking the frame above that. Still a bit brittle, but I think it's the best you can do by just looking at function names, and we're probably not going to add anymore classes into the inheritance chain. |
||
---|---|---|
.. | ||
automation | ||
data/lazy_import_test | ||
dynamic | ||
langhost | ||
provider | ||
runtime | ||
__init__.py | ||
conftest.py | ||
helpers.py | ||
test_broken_dynamic_provider.py | ||
test_config.py | ||
test_deprecated.py | ||
test_invoke.py | ||
test_monitor_termination.py | ||
test_next_serialize.py | ||
test_output.py | ||
test_resource.py | ||
test_runtime_to_json.py | ||
test_stack_reference.py | ||
test_stack_registers_outputs.py | ||
test_translate_output_properties.py | ||
test_types_input_type.py | ||
test_types_input_type_types.py | ||
test_types_output_type.py | ||
test_types_resource_types.py | ||
test_urn.py | ||
test_utils.py |