diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2018-09-16 11:07:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-16 11:07:26 -0400 |
commit | d00313856696b00710b8cf8052569d38c2536580 (patch) | |
tree | 0d31d33e2d531d127537ea121b63e34b65fa23a8 /setuptools/tests | |
parent | c5592a3c38f6d3ccfa81dcae9c457a150635d51c (diff) | |
parent | 47874756915a9a757f81d87f32ef5bfa2a333a26 (diff) | |
download | external_python_setuptools-d00313856696b00710b8cf8052569d38c2536580.tar.gz external_python_setuptools-d00313856696b00710b8cf8052569d38c2536580.tar.bz2 external_python_setuptools-d00313856696b00710b8cf8052569d38c2536580.zip |
Merge pull request #1427 from stephenfin/touch-egg-info-directory
Touch 'egg-info' directory
Diffstat (limited to 'setuptools/tests')
-rw-r--r-- | setuptools/tests/test_egg_info.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 17d40fb8..59ffb16d 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -1,9 +1,11 @@ +import datetime import sys import ast import os import glob import re import stat +import time from setuptools.command.egg_info import egg_info, manifest_maker from setuptools.dist import Distribution @@ -146,6 +148,21 @@ class TestEggInfo: ] assert sorted(actual) == expected + def test_rebuilt(self, tmpdir_cwd, env): + """Ensure timestamps are updated when the command is re-run.""" + self._create_project() + + self._run_egg_info_command(tmpdir_cwd, env) + timestamp_a = os.path.getmtime('foo.egg-info') + + # arbitrary sleep just to handle *really* fast systems + time.sleep(.001) + + self._run_egg_info_command(tmpdir_cwd, env) + timestamp_b = os.path.getmtime('foo.egg-info') + + assert timestamp_a != timestamp_b + def test_manifest_template_is_read(self, tmpdir_cwd, env): self._create_project() build_files({ |