Beispiel #1
0
class TestDevelopSkelLink(AsyncTestCase):

    skel = Skel()

    async def test_run(self):
        # Skip if not in development mode
        if not is_develop("dffml"):
            self.skipTest("dffml not installed in development mode")
        await Develop.cli("skel", "link")
        common_files = [
            path.relative_to(self.skel.common)
            for path in self.skel.common_files()
        ]
        # At time of writing there are 4 plugins in skel/ change this as needed
        plugins = self.skel.plugins()
        self.assertGreater(len(plugins), 3)
        for plugin in plugins:
            for check in COMMON_FILES:
                # We skip the setup.cfg symlink check for blank because it has a
                # custom setup.cfg
                if plugin.name == "blank" and check.name == "setup.cfg":
                    continue
                with chdir(plugin):
                    self.assertTrue(
                        check.is_symlink(),
                        f"{check.resolve()} is not a symlink",
                    )
Beispiel #2
0
class TestSkelUtil(AsyncTestCase):

    skel = Skel()

    def test_all_common_files_accounted_for(self):
        common_files = [
            path.relative_to(self.skel.common)
            for path in self.skel.common_files()
        ]
        for check in COMMON_FILES:
            self.assertIn(check, common_files)
Beispiel #3
0
class TestDevelopSkelLink(AsyncTestCase):

    skel = Skel()

    async def test_run(self):
        await Develop.cli("skel", "link")
        common_files = [
            path.relative_to(self.skel.common)
            for path in self.skel.common_files()
        ]
        # At time of writing there are 4 plugins in skel/ change this as needed
        plugins = self.skel.plugins()
        self.assertGreater(len(plugins), 3)
        for plugin in plugins:
            for check in COMMON_FILES:
                with chdir(plugin):
                    self.assertTrue(
                        check.is_symlink(),
                        f"{check.resolve()} is not a symlink",
                    )