summaryrefslogtreecommitdiff
path: root/testing/test_functions.py
diff options
context:
space:
mode:
authorJonathan Piron <jonathan.piron@cybelangel.com>2018-07-02 17:54:28 +0200
committerJonathan Piron <jonathan.piron@cybelangel.com>2018-07-02 17:54:28 +0200
commitbdea4b8c7f13e0e3ea9132948c07f47069259a55 (patch)
treef86f0fd144f52f811a74c2ecceb659a44c0d93f6 /testing/test_functions.py
parent46e5a1bfaaae4412089c5d61915c03342525097d (diff)
downloadsetuptools-scm-bdea4b8c7f13e0e3ea9132948c07f47069259a55.tar.gz
Add some pretned tests
Diffstat (limited to 'testing/test_functions.py')
-rw-r--r--testing/test_functions.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/testing/test_functions.py b/testing/test_functions.py
index db573ac..6c82b32 100644
--- a/testing/test_functions.py
+++ b/testing/test_functions.py
@@ -72,10 +72,13 @@ def test_dump_version_doesnt_bail_on_value_error(tmpdir):
assert str(exc_info.value).startswith("bad file format:")
-def test_dump_version_works_with_pretend(tmpdir, monkeypatch):
- monkeypatch.setenv(PRETEND_KEY, "1.0")
+@pytest.mark.parametrize(
+ "version", ["1.0", "1.2.3.dev1+ge871260", "1.2.3.dev15+ge871260.d20180625"]
+)
+def test_dump_version_works_with_pretend(version, tmpdir, monkeypatch):
+ monkeypatch.setenv(PRETEND_KEY, version)
get_version(write_to=str(tmpdir.join("VERSION.txt")))
- assert tmpdir.join("VERSION.txt").read() == "1.0"
+ assert tmpdir.join("VERSION.txt").read() == version
def test_has_command(recwarn):