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>
This commit is contained in:
parent
41a042f07d
commit
d1ff1183a5
29 changed files with 323 additions and 175 deletions
19
prototyping/dependency_injection.py
Normal file
19
prototyping/dependency_injection.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue