Coverage for tests/fixtures/dynamic_members.py: 81.82%

9 statements  

« prev     ^ index     » next       coverage.py v7.6.12, created at 2025-03-09 17:28 +0100

1# See issue 65: https://github.com/pawamoy/mkdocstrings/issues/65 

2 

3 

4def method1(): 

5 pass 

6 

7 

8def method2(): 

9 pass 

10 

11 

12METHODS = { 

13 "method1": method1, 

14 "method2": method2, 

15} 

16 

17 

18class Class: 

19 pass 

20 

21 

22for name, method in METHODS.items(): 

23 setattr(Class, name, method)