Skip to content

Commit

Permalink
Add docstrings explaining the intention of the test. Ref #553.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Apr 20, 2016
1 parent 25b2a2d commit ae8574c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions setuptools/tests/test_egg_info.py
Expand Up @@ -64,6 +64,12 @@ def env(self):
yield env

def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env):
"""
When the egg_info section is empty or not present, running
save_version_info should add the settings to the setup.cfg
in a deterministic order, consistent with the ordering found
on Python 2.6 and 2.7 with PYTHONHASHSEED=0.
"""
setup_cfg = os.path.join(env.paths['home'], 'setup.cfg')
dist = Distribution()
ei = egg_info(dist)
Expand Down Expand Up @@ -92,6 +98,13 @@ def _validate_content_order(content, expected):
assert re.search(pattern, content, flags)

def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env):
"""
When running save_version_info on an existing setup.cfg
with the 'default' values present from a previous run,
the file should remain unchanged, except on Python 2.6,
where the order of the keys will be changed to match the
order as found in a dictionary of those keys.
"""
setup_cfg = os.path.join(env.paths['home'], 'setup.cfg')
build_files({
setup_cfg: DALS("""
Expand Down

0 comments on commit ae8574c

Please sign in to comment.