Ejemplo n.º 1
0
    def test_find_setup_py_exclude_default(self) -> None:
        with TemporaryDirectory() as td:
            td_path = Path(td)
            build_path = td_path / "build-arm"
            cooper_path = td_path / "cooper"

            touch_files(*(adir / "setup.py"
                          for adir in {build_path, cooper_path}))

            setup_pys = ptr.find_setup_pys(td_path, {"build*"})
            self.assertEqual(len(setup_pys), 1)
            self.assertEqual(setup_pys.pop().relative_to(td_path),
                             Path("cooper/setup.py"))
Ejemplo n.º 2
0
 def test_find_setup_py(self) -> None:
     base_path = Path(__file__).parent
     found_setup_py = ptr.find_setup_pys(base_path, set()).pop()
     self.assertEqual(str(found_setup_py.relative_to(base_path)),
                      "setup.py")