From e52e3d10c409219479ccfd371f24e3b6d53b73b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Wed, 16 Nov 2022 21:25:23 +0000 Subject: Fix reading of test lists. --- python/subunit/tests/test_filters.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'python/subunit/tests') diff --git a/python/subunit/tests/test_filters.py b/python/subunit/tests/test_filters.py index 0a5e7c7..bc797da 100644 --- a/python/subunit/tests/test_filters.py +++ b/python/subunit/tests/test_filters.py @@ -21,6 +21,17 @@ from testtools import TestCase from subunit.filters import find_stream +from subunit import read_test_list + + +class TestReadTestList(TestCase): + + def test_read_list(self): + with NamedTemporaryFile() as f: + f.write(b'foo\nbar\n# comment\nother # comment\n') + f.flush() + self.assertEqual(read_test_list(f.name), ['foo', 'bar', 'other']) + class TestFindStream(TestCase): -- cgit v1.2.1