Open blackjack2693 opened 2 years ago
You can do better assertions if you mock the randomization or initialize it with a fixed seed so the output becomes deterministic.
_Originally posted by @Raandom in https://github.com/hpi-epic/BP2021/pull/151#discussion_r777106504_
The assertion of the customer logic is limited by the randomisation. We should use a seed to make the results deterministic and accurately testable.
Apparently pytest-randomly also sets the random.seed according to its seed, so we could use that. https://pythonawesome.com/pytest-plugin-to-randomly-order-tests-and-control-random-seed/
random.seed
You can do better assertions if you mock the randomization or initialize it with a fixed seed so the output becomes deterministic.
_Originally posted by @Raandom in https://github.com/hpi-epic/BP2021/pull/151#discussion_r777106504_
The assertion of the customer logic is limited by the randomisation. We should use a seed to make the results deterministic and accurately testable.