|
5 | 5 | # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
|
6 | 6 |
|
7 | 7 | import argparse
|
8 |
| -import yaml |
9 |
| -from os import path |
10 | 8 | import sys
|
| 9 | +from os import path |
11 | 10 | from pprint import pformat
|
12 |
| -from io import StringIO |
| 11 | + |
| 12 | +import yaml |
13 | 13 |
|
14 | 14 | PERMITTED_STR_KEYS = ['size', 'region']
|
15 | 15 | END_TO_START = 'end_to_start'
|
@@ -1050,23 +1050,5 @@ def main():
|
1050 | 1050 | write_yaml_out_file(regions, args.output_regions)
|
1051 | 1051 |
|
1052 | 1052 |
|
1053 |
| -def expect_addr_size(td, name, expected_address, expected_size): |
1054 |
| - if expected_size is not None: |
1055 |
| - assert td[name]['size'] == expected_size, \ |
1056 |
| - 'Size of {} was {}, expected {}.\ntd:{}'.format(name, td[name]['size'], expected_size, pformat(td)) |
1057 |
| - if expected_address is not None: |
1058 |
| - assert td[name]['address'] == expected_address, \ |
1059 |
| - 'Address of {} was {}, expected {}.\ntd:{}'.format(name, td[name]['address'], expected_address, pformat(td)) |
1060 |
| - if expected_size is not None and expected_address is not None: |
1061 |
| - assert td[name]['end_address'] == expected_address + expected_size, \ |
1062 |
| - 'End address of {} was {}, expected {}.\ntd:{}'.format(name, td[name]['end_address'], expected_address + expected_size, pformat(td)) |
1063 |
| - |
1064 |
| - |
1065 |
| -def expect_list(expected, actual): |
1066 |
| - expected_list = list(sorted(expected)) |
1067 |
| - actual_list = list(sorted(actual)) |
1068 |
| - assert sorted(expected_list) == sorted(actual_list), 'Expected list {}, was {}'.format(expected_list, actual_list) |
1069 |
| - |
1070 |
| - |
1071 | 1053 | if __name__ == '__main__':
|
1072 | 1054 | main()
|
0 commit comments