(self, configs, expected)
| 906 | self.assertEqual(pre_config, expected) |
| 907 | |
| 908 | def check_config(self, configs, expected): |
| 909 | config = dict(configs['config']) |
| 910 | if MS_WINDOWS: |
| 911 | value = config.get(key := 'program_name') |
| 912 | if value and isinstance(value, str): |
| 913 | value = value[:len(value.lower().removesuffix('.exe'))] |
| 914 | if debug_build(sys.executable): |
| 915 | value = value[:len(value.lower().removesuffix('_d'))] |
| 916 | config[key] = value |
| 917 | for key, value in list(expected.items()): |
| 918 | if value is self.IGNORE_CONFIG: |
| 919 | config.pop(key, None) |
| 920 | del expected[key] |
| 921 | # Resolve bool/int mismatches to reduce noise in diffs |
| 922 | if isinstance(value, (bool, int)) and isinstance(config.get(key), (bool, int)): |
| 923 | expected[key] = type(config[key])(expected[key]) |
| 924 | self.assertEqual(config, expected) |
| 925 | |
| 926 | def check_global_config(self, configs): |
| 927 | pre_config = configs['pre_config'] |
no test coverage detected