e2e_tests/prototyping/dependency_injection.py
Daniel d1ff1183a5 refactoring (#13)
* general project refactoring

* various small improvements

* improve imap fixture with helper functions and typing

* add wordpress send email setup

* add wordpress receive email test

* add various documentation

Reviewed-on: local-it-infrastructure/e2e_tests#13
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-12-08 18:17:31 +01:00

19 lines
325 B
Python

import inspect
a = 2
b = 3
c = 4
def func(a: int, c: int) -> int:
return a + c
arg_names = inspect.getfullargspec(func).args
print(arg_names) # ['a', 'c']
arguments = {arg: globals()[arg] for arg in arg_names if arg in globals()}
print(arguments) # {'a': 2, 'c': 4}
result = func(**arguments)
print(result) # 6