summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2019-11-24 08:07:52 -0500
committerJason R. Coombs <jaraco@jaraco.com>2019-11-24 08:07:52 -0500
commit31d22f3515c8ad49ceab68cd43e55f70838b7251 (patch)
tree4dc272e8c65d429c250a1d7d67a4ea23942bca20
parent1fe1c650a6b01e8f5f9c8dff7a1bb5ad132588db (diff)
downloadsetuptools-scm-31d22f3515c8ad49ceab68cd43e55f70838b7251.tar.gz
Add integration test
-rw-r--r--testing/test_integration.py17
-rw-r--r--tox.ini1
2 files changed, 18 insertions, 0 deletions
diff --git a/testing/test_integration.py b/testing/test_integration.py
new file mode 100644
index 0000000..2a24559
--- /dev/null
+++ b/testing/test_integration.py
@@ -0,0 +1,17 @@
+import sys
+
+from setuptools_scm.utils import do
+
+
+def test_pyproject_support(tmpdir, monkeypatch):
+ monkeypatch.delenv("SETUPTOOLS_SCM_DEBUG")
+ pkg = tmpdir.ensure("package", dir=42)
+ pkg.join("pyproject.toml").write(
+ """[tool.setuptools_scm]
+enabled = true
+fallback_version = "12.34"
+"""
+ )
+ pkg.join("setup.py").write("__import__('setuptools').setup()")
+ res = do((sys.executable, "setup.py", "--version"), pkg)
+ assert res == "12.34"
diff --git a/tox.ini b/tox.ini
index 4ab3c79..b51ef3d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -25,6 +25,7 @@ skip_install=
test: False
deps=
pytest
+ setuptools >= 42
commands=
test: py.test []
selfcheck: python setup.py --version