File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 66import mimetypes
77import os
88import sys
9- import tomllib
109from pathlib import Path
1110from urllib import error , parse , request
1211
12+ try :
13+ import tomllib
14+ except ModuleNotFoundError : # pragma: no cover
15+ import tomli as tomllib
16+
1317try :
1418 import yaml
1519except ImportError as exc : # pragma: no cover - exercised in release workflow
Original file line number Diff line number Diff line change 33import importlib .util
44import re
55import subprocess
6- import tomllib
76from pathlib import Path
87
98import pytest
@@ -87,8 +86,7 @@ def test_zenodo_release_metadata_is_built_from_repository_sources():
8786 """
8887 publish_zenodo = _load_publish_zenodo ()
8988 citation = yaml .safe_load (CITATION_CFF .read_text (encoding = "utf-8" ))
90- with PYPROJECT .open ("rb" ) as handle :
91- pyproject = tomllib .load (handle )
89+ pyproject = publish_zenodo .load_pyproject (PYPROJECT )
9290 metadata = publish_zenodo .build_metadata (citation , pyproject )
9391 assert metadata ["title" ] == citation ["title" ]
9492 assert metadata ["upload_type" ] == "software"
You can’t perform that action at this time.
0 commit comments