Commit e662de5
Add test for cross-module getter→setter enum roundtrip
The existing test_cross_module_scoped_enum_imports test had a gap:
it didn't test the scenario where a class in module B uses both
getter and setter methods for an enum defined in module A.
This is the exact pattern that failed in pyOpenMS:
s.setType(s.getType()) # Cross-module roundtrip
Changes:
- Add StatusTracker class to EnumConsumer with getter/setter for
enums from EnumProvider (both Task::TaskStatus and Priority)
- Add Runtime Test 8 that validates tracker.setX(tracker.getX())
works correctly across module boundaries
- Update test assertions to check for _get_scoped_enum_class()
pattern instead of the old globals().get() pattern
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 7597114 commit e662de5
File tree
3 files changed
+62
-5
lines changed- tests
- test_files/enum_cross_module
3 files changed
+62
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
861 | 861 | | |
862 | 862 | | |
863 | 863 | | |
864 | | - | |
865 | | - | |
866 | | - | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
867 | 868 | | |
868 | 869 | | |
869 | | - | |
870 | | - | |
| 870 | + | |
| 871 | + | |
871 | 872 | | |
872 | 873 | | |
873 | 874 | | |
| |||
976 | 977 | | |
977 | 978 | | |
978 | 979 | | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
979 | 1001 | | |
980 | 1002 | | |
981 | 1003 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
38 | 63 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments