Skip to content

Commit

Permalink
acceptance test and changelog for issue #167
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Apr 8, 2017
1 parent f9dd60a commit a9a1bd5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v1.15.5
=======

* fix #167 by correctly respecting preformatted version metadata
from PKG-INFO/EGG-INFO

v1.15.4
=======

Expand Down
10 changes: 7 additions & 3 deletions testing/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@ def commit_testfile(self, reason=None):
self(self.add_command)
self.commit(reason=reason)

@property
def version(self):
def get_version(self, **kw):
__tracebackhide__ = True
from setuptools_scm import get_version
version = get_version(root=str(self.cwd))
version = get_version(root=str(self.cwd), **kw)
print(version)
return version

@property
def version(self):
__tracebackhide__ = True
return self.get_version()


@pytest.yield_fixture(autouse=True)
def debug_mode():
Expand Down
3 changes: 3 additions & 0 deletions testing/test_basic_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def test_version_from_pkginfo(wd):
wd.write('PKG-INFO', 'Version: 0.1')
assert wd.version == '0.1'

# replicate issue 167
assert wd.get_version(version_scheme="1.{0.distance}.0".format) == '0.1'


def assert_root(monkeypatch, expected_root):
"""
Expand Down

0 comments on commit a9a1bd5

Please sign in to comment.