-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2021.7.30: boostrapping calver
#7
Comments
OK looks like setting env variable Nevertheless after that I've hit another issue wiit pytest.
Here is pytest output: + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-calver-2021.7.30-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-calver-2021.7.30-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/calver-2021.7.30
collected 7 items
tests/test_integration.py ...FFF. [100%]
================================================================================= FAILURES =================================================================================
____________________________________________________________________________ test_version_true _____________________________________________________________________________
dist = <stub(metadata=<stub(version='2021.7.30')>)>, keyword = <stub()>
def test_version_true(dist, keyword):
value = True
calver.integration.version(dist, keyword, value)
> assert dist.metadata.version == datetime.datetime.now().strftime(
calver.integration.DEFAULT_FORMAT
)
E AssertionError: assert '2021.7.30' == '2022.04.09'
E - 2022.04.09
E + 2021.7.30
tests/test_integration.py:36: AssertionError
_____________________________________________________________________________ test_version_str _____________________________________________________________________________
dist = <stub(metadata=<stub(version='2021.7.30')>)>, keyword = <stub()>
def test_version_str(dist, keyword):
value = "%c"
calver.integration.version(dist, keyword, value)
> assert dist.metadata.version == datetime.datetime.now().strftime(value)
E AssertionError: assert '2021.7.30' == 'Sat Apr 9 11:00:28 2022'
E - Sat Apr 9 11:00:28 2022
E + 2021.7.30
tests/test_integration.py:46: AssertionError
__________________________________________________________________________ test_version_callable ___________________________________________________________________________
dist = <stub(metadata=<stub(version='2021.7.30')>)>, keyword = <stub()>
def test_version_callable(dist, keyword):
v = pretend.stub()
value = lambda: v
calver.integration.version(dist, keyword, value)
> assert dist.metadata.version == v
E AssertionError: assert '2021.7.30' == <stub()>
E + where '2021.7.30' = <stub(version='2021.7.30')>.version
E + where <stub(version='2021.7.30')> = <stub(metadata=<stub(version='2021.7.30')>)>.metadata
tests/test_integration.py:55: AssertionError
========================================================================= short test summary info ==========================================================================
FAILED tests/test_integration.py::test_version_true - AssertionError: assert '2021.7.30' == '2022.04.09'
FAILED tests/test_integration.py::test_version_str - AssertionError: assert '2021.7.30' == 'Sat Apr 9 11:00:28 2022'
FAILED tests/test_integration.py::test_version_callable - AssertionError: assert '2021.7.30' == <stub()>
======================================================================= 3 failed, 4 passed in 0.07s ======================================================================== Looks like pytest is testing agains vestion generated from current date. |
I think #8 should fix #7 (comment), can you confirm?
|
Looks like
calver
needscalver
on build using pep517 build procedure.How to boostrap
calver
? 🤔The text was updated successfully, but these errors were encountered: