From ec02e362365ee199f734cb9e76fc812dd92d3113 Mon Sep 17 00:00:00 2001 From: pommicket Date: Tue, 23 Sep 2025 11:16:21 -0400 Subject: Add location tests, fix locations for multi-line items --- tests/location.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/location.py (limited to 'tests/location.py') diff --git a/tests/location.py b/tests/location.py new file mode 100644 index 0000000..cdac8e7 --- /dev/null +++ b/tests/location.py @@ -0,0 +1,11 @@ +import pom_parser +import unittest + +def test_path(tester: unittest.TestCase, loc_path: str) -> None: + conf_path = loc_path.replace('.locations.pom', '.pom') + locs = pom_parser.load_path(loc_path) + conf = pom_parser.load_path(conf_path) + for item in conf.items(): + expected = locs.get_uint(item.key) + tester.assertTrue(expected is not None) + tester.assertEqual(expected, item.line, f'Incorrect line number for {item.key}') -- cgit v1.2.3