Closed hodjat91 closed 4 years ago
Hi Hodjat, Thank you for pointing this out. There actually was an issue with support of plain (non-IntEnum) enumerated types. Also, enumerated types in general were not being properly biased for randomization, and the distribution was off. I've corrected both of these issues with a9d7d1a. I also created PyPi release 0.0.3 from this. Thanks again for the report and testcase!
Best Regards, Matthew
Thank you Matthew.
Hello,
I'm trying to randomize an enum-type attribute (it's been mentioned in the manual that Enum and IntEnum are supported by PyVSC). When I try this example from the manual:
Then this error happens in the last line: TypeError: int() argument must be a string, a bytes-like object or a number, not 'my_e'. However, with IntEnum (instead of Enum), it works but seems like doesn't actually do the randomization, below code doesn't randomize the enum (inst.a), but it does randomize the uint8 attribute:
I think I'm missing something here... Could someone please explain this behavior?
Thanks, Hodjat