diff options
Diffstat (limited to 'testsuite.py')
| -rw-r--r-- | testsuite.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/testsuite.py b/testsuite.py index 65ce4aa..22e12cc 100644 --- a/testsuite.py +++ b/testsuite.py @@ -2537,13 +2537,16 @@ config PRINT_ME_TOO sys.path.pop(0) + # This test can fail on older Python 3.x versions, because they don't + # preserve dict insertion order during iteration. The output is still + # correct, just different. + if not (3, 0) <= sys.version_info <= (3, 5): + print("Testing KCONFIG_WARN_UNDEF") - print("Testing KCONFIG_WARN_UNDEF") + os.environ["KCONFIG_WARN_UNDEF"] = "y" + c = Kconfig("Kconfiglib/tests/Kundef", warn_to_stderr=False) - os.environ["KCONFIG_WARN_UNDEF"] = "y" - c = Kconfig("Kconfiglib/tests/Kundef", warn_to_stderr=False) - - verify_equal("\n".join(c.warnings), """ + verify_equal("\n".join(c.warnings), """ warning: the int symbol INT (defined at Kconfiglib/tests/Kundef:8) has a non-int range [UNDEF_2 (undefined), 8 (undefined)] warning: undefined symbol UNDEF_1: @@ -2584,7 +2587,7 @@ menu "menu" visible if UNDEF_3 """[1:-1]) - os.environ.pop("KCONFIG_WARN_UNDEF") + os.environ.pop("KCONFIG_WARN_UNDEF") print("\nAll selftests passed\n" if all_passed else |
