Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions testing/test_integration.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
import sys

import pytest

from setuptools_scm.utils import do


@pytest.fixture
def wd(wd):
wd("git init")
wd("git config user.email test@example.com")
wd('git config user.name "a test"')
wd.add_command = "git add ."
wd.commit_command = "git commit -m test-{reason}"
return wd


def test_pyproject_support(tmpdir, monkeypatch):
monkeypatch.delenv("SETUPTOOLS_SCM_DEBUG")
pkg = tmpdir.ensure("package", dir=42)
Expand All @@ -14,3 +26,13 @@ def test_pyproject_support(tmpdir, monkeypatch):
pkg.join("setup.py").write("__import__('setuptools').setup()")
res = do((sys.executable, "setup.py", "--version"), pkg)
assert res == "12.34"


@pytest.mark.xfail(reason="#174")
def test_pyproject_support_with_git(tmpdir, monkeypatch, wd):
monkeypatch.delenv("SETUPTOOLS_SCM_DEBUG")
pkg = tmpdir.join("wd")
pkg.join("pyproject.toml").write("""[tool.setuptools_scm]""")
pkg.join("setup.py").write("__import__('setuptools').setup()")
res = do((sys.executable, "setup.py", "--version"), pkg)
assert res == "0.1.dev0"