diff options
author | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> | 2020-05-07 10:00:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-07 10:00:12 +0200 |
commit | e7f0b4bfd9a1f86ba946469a91b6261366bc5f3e (patch) | |
tree | a5bfff248c951fddbab6304356f22423985a3582 | |
parent | 2732199b5e02b7f1e1681d264dd4a39846d40d95 (diff) | |
parent | 49b9ed36e3fd92ddf1c62a5ddedb7019b300eb79 (diff) | |
download | setuptools-scm-e7f0b4bfd9a1f86ba946469a91b6261366bc5f3e.tar.gz |
Merge pull request #428 from pypa/bugfix/427-utc-mismatch
Generate the date for today in UTC
-rw-r--r-- | testing/test_git.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/testing/test_git.py b/testing/test_git.py index ac45b5b..2e86efb 100644 --- a/testing/test_git.py +++ b/testing/test_git.py @@ -4,7 +4,7 @@ from setuptools_scm import integration from setuptools_scm.utils import do from setuptools_scm import git import pytest -from datetime import date +from datetime import datetime from os.path import join as opj from setuptools_scm.file_finder_git import git_find_files @@ -113,7 +113,8 @@ def test_git_dirty_notag(wd): wd.write("test.txt", "test2") wd("git add test.txt") assert wd.version.startswith("0.1.dev1") - today = date.today() + # the date on the tag is in UTC + today = datetime.utcnow().date() # we are dirty, check for the tag assert today.strftime(".d%Y%m%d") in wd.version |