Skip to content

Commit 240dd71

Browse files
authored
Prepare for (pre) release: v1.0.0a10 (#141)
* Attempt to fix the version regex * Added tests/test_pytest_celery.py * Bumping version from 1.0.0a9 to 1.0.0a10
1 parent d592642 commit 240dd71

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ description = "Pytest plugin for Celery"
6161
homepage = "https://github.com/celery/pytest-celery"
6262
license = "BSD"
6363
name = "pytest-celery"
64-
version = "1.0.0a9"
64+
version = "1.0.0a10"
6565

6666
[tool.poetry_bumpversion.file."src/pytest_celery/__init__.py"]
6767
search = '__version__ = "{current_version}"'

src/pytest_celery/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# flake8: noqa
66

77

8-
__version__ = "1.0.0a9"
8+
__version__ = "1.0.0a10"
99

1010

1111
import re
@@ -48,9 +48,8 @@
4848
)
4949

5050

51-
# bumpversion can only search for {current_version}
52-
# so we have to parse the version here.
53-
_temp = re.match(r"(\d+)\.(\d+).(\d+)(.+)?", __version__).groups() # type: ignore
51+
# Required for RTD to build
52+
_temp = re.match(r"(\d+)\.(\d+)\.(\d+)([a-zA-Z0-9]+)?", __version__).groups() # type: ignore
5453
VERSION = version_info = version_info_t(int(_temp[0]), int(_temp[1]), int(_temp[2]), _temp[3] or "", "")
5554
del _temp
5655
del re

tests/test_pytest_celery.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import pytest_celery
2+
3+
4+
def test_version():
5+
assert pytest_celery.VERSION
6+
assert len(pytest_celery.VERSION) >= 3
7+
pytest_celery.VERSION = (0, 3, 0)
8+
assert pytest_celery.__version__.count(".") >= 2

0 commit comments

Comments
 (0)