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/__init__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests/__init__.py') diff --git a/tests/__init__.py b/tests/__init__.py index aed3dc6..5616c23 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,6 +1,6 @@ import unittest import os -from tests import parsing, errors +from tests import parsing, errors, location class TestParsing(unittest.TestCase): def test_all(self) -> None: @@ -18,6 +18,14 @@ class TestErrors(unittest.TestCase): with self.subTest(file): errors.test_path(self, f'{test_dir}/{file}') +class TestLocation(unittest.TestCase): + def test_all(self) -> None: + test_dir = '../tests/location' + for file in os.listdir(test_dir): + if not file.endswith('.locations.pom'): continue + with self.subTest(file): + location.test_path(self, f'{test_dir}/{file}') + if __name__ == '__main__': unittest.main() -- cgit v1.2.3