File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33from __future__ import annotations
44
55import json
6+ import re
67from pathlib import Path
78
8- import tomllib
9-
109ROOT = Path (__file__ ).parent .parent
1110
1211
1312def test_worktree_version_matches_last_release_manifest () -> None :
14- project = tomllib .loads ((ROOT / "pyproject.toml" ).read_text ())
13+ pyproject = (ROOT / "pyproject.toml" ).read_text ()
14+ project_section = re .search (
15+ r'^\[project\]\s*$.*?^version\s*=\s*"([^"]+)"' ,
16+ pyproject ,
17+ flags = re .MULTILINE | re .DOTALL ,
18+ )
19+ assert project_section is not None
1520 manifest = json .loads ((ROOT / ".release-please-manifest.json" ).read_text ())
16- assert project [ "project" ][ "version" ] == manifest ["." ]
21+ assert project_section . group ( 1 ) == manifest ["." ]
1722
1823
1924def test_release_please_targets_v7_rc_from_breaking_commit () -> None :
You can’t perform that action at this time.
0 commit comments