From 31d22f3515c8ad49ceab68cd43e55f70838b7251 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2019 08:07:52 -0500 Subject: Add integration test --- testing/test_integration.py | 17 +++++++++++++++++ tox.ini | 1 + 2 files changed, 18 insertions(+) create mode 100644 testing/test_integration.py 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 -- cgit v1.2.1