__init__.py 529 B

123456789101112131415161718
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. """
  3. Randomize choices with correct dependencies
  4. When shuffling a choice may potentially disrupt certain dependencies, symbol
  5. values must be recalculated.
  6. Related Linux commits:
  7. - c8fb7d7e48d11520ad24808cfce7afb7b9c9f798
  8. """
  9. def test(conf):
  10. for i in range(20):
  11. assert conf.randconfig(seed=i) == 0
  12. assert (conf.config_matches('expected_config0') or
  13. conf.config_matches('expected_config1') or
  14. conf.config_matches('expected_config2'))