Skip to content

Commit 445ee20

Browse files
committed
test(omp): keep the embedded package version in sync
1 parent 535aa56 commit 445ee20

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎tests/test_omp_install.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,20 @@
88

99
from graphify.install import dispatch_install_cli
1010

11+
try:
12+
import tomllib
13+
except ModuleNotFoundError: # Python 3.10
14+
import tomli as tomllib # type: ignore[no-redef]
15+
1116

1217
def test_omp_path_is_a_complete_native_package(monkeypatch, capsys):
1318
monkeypatch.setattr(sys, "argv", ["graphify", "omp", "path"])
1419
assert dispatch_install_cli("omp")
1520
package = Path(capsys.readouterr().out.strip())
1621
manifest = json.loads((package / "package.json").read_text(encoding="utf-8"))
1722
assert manifest["omp"]["extensions"]
23+
pyproject = tomllib.loads((package.parents[1] / "pyproject.toml").read_text(encoding="utf-8"))
24+
assert manifest["version"] == pyproject["project"]["version"]
1825
for entry in manifest["omp"]["extensions"]:
1926
assert (package / entry).is_file()
2027
assert (package / entry).resolve().is_relative_to(package)

0 commit comments

Comments
 (0)