From 2df07c015009887523d9758abecdc5f74a413dc5 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 9 Jun 2017 16:22:36 -0400 Subject: [PATCH] Allow running selectors tests with test-unit. --- python/servo/testing_commands.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 23b25a00e2aa..08598584a4f5 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -236,6 +236,14 @@ def test_unit(self, test_name=None, package=None, bench=False, nocapture=False): packages = set(os.listdir(path.join(self.context.topdir, "tests", "unit"))) - set(['.DS_Store']) in_crate_packages += ["selectors"] + # Since the selectors tests have no corresponding selectors_tests crate in tests/unit, + # we need to treat them separately from those that do. + try: + packages.remove('selectors') + in_crate_packages += ["selectors"] + except KeyError: + pass + packages.discard('stylo') has_style = True