summaryrefslogtreecommitdiff
path: root/tests/__init__.py
blob: 5616c2374e6f0dbbf51adfa8a22ab34fe4c14620 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import unittest
import os
from tests import parsing, errors, location

class TestParsing(unittest.TestCase):
	def test_all(self) -> None:
		test_dir = '../tests/parsing'
		for file in os.listdir(test_dir):
			if not file.endswith('.flat.pom'): continue
			with self.subTest(file):
				parsing.test_path(self, f'{test_dir}/{file}')

class TestErrors(unittest.TestCase):
	def test_all(self) -> None:
		test_dir = '../tests/errors'
		for file in os.listdir(test_dir):
			if not file.endswith('.pom'): continue
			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()