Skip to content

Commit

Permalink
Prepare for (pre) release: v1.0.0a10 (#141)
Browse files Browse the repository at this point in the history
* Attempt to fix the version regex

* Added tests/test_pytest_celery.py

* Bumping version from 1.0.0a9 to 1.0.0a10
  • Loading branch information
Nusnus authored Jan 2, 2024
1 parent d592642 commit 240dd71
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ description = "Pytest plugin for Celery"
homepage = "https://github.com/celery/pytest-celery"
license = "BSD"
name = "pytest-celery"
version = "1.0.0a9"
version = "1.0.0a10"

[tool.poetry_bumpversion.file."src/pytest_celery/__init__.py"]
search = '__version__ = "{current_version}"'
Expand Down
7 changes: 3 additions & 4 deletions src/pytest_celery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# flake8: noqa


__version__ = "1.0.0a9"
__version__ = "1.0.0a10"


import re
Expand Down Expand Up @@ -48,9 +48,8 @@
)


# bumpversion can only search for {current_version}
# so we have to parse the version here.
_temp = re.match(r"(\d+)\.(\d+).(\d+)(.+)?", __version__).groups() # type: ignore
# Required for RTD to build
_temp = re.match(r"(\d+)\.(\d+)\.(\d+)([a-zA-Z0-9]+)?", __version__).groups() # type: ignore
VERSION = version_info = version_info_t(int(_temp[0]), int(_temp[1]), int(_temp[2]), _temp[3] or "", "")
del _temp
del re
8 changes: 8 additions & 0 deletions tests/test_pytest_celery.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest_celery


def test_version():
assert pytest_celery.VERSION
assert len(pytest_celery.VERSION) >= 3
pytest_celery.VERSION = (0, 3, 0)
assert pytest_celery.__version__.count(".") >= 2

0 comments on commit 240dd71

Please sign in to comment.