Beispiel #1
0
    def test_dot_git(self):
        git_dir = self.temp_path / '.git'
        git_dir.mkdir()

        self.assertTrue(git_dir.exists())
        self.assertTrue(git_dir.is_dir())
        self.assertTrue(is_project_root(self.temp_path))
Beispiel #2
0
    def test_setup_cfg(self):
        setup_cfg = self.temp_path / 'setup.cfg'
        setup_cfg.touch()

        self.assertTrue(setup_cfg.exists())
        self.assertTrue(is_project_root(self.temp_path))
Beispiel #3
0
    def test_setup_py(self):
        setup_py = self.temp_path / 'setup.py'
        setup_py.touch()

        self.assertTrue(setup_py.exists())
        self.assertTrue(is_project_root(self.temp_path))
Beispiel #4
0
    def test_pyproject_toml(self):
        pyproject_toml = self.temp_path / 'pyproject.toml'
        pyproject_toml.touch()

        self.assertTrue(pyproject_toml.exists())
        self.assertTrue(is_project_root(self.temp_path))
Beispiel #5
0
 def test_no_root(self):
     self.assertFalse(is_project_root(self.temp_path))