Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Commit c72f6ac

Browse files
committed
fixes for python3-pip-skeleton merge
1 parent 709181b commit c72f6ac

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pyproject.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,17 @@ dev = [
3232
"sphinx-autobuild",
3333
"sphinx-copybutton",
3434
"sphinx-design",
35+
"toml",
3536
"tox-direct",
3637
"types-mock",
38+
"types-toml",
3739
]
3840

3941
[project.scripts]
4042
python3-pip-skeleton = "python3_pip_skeleton.__main__:main"
4143

4244
[project.urls]
43-
GitHub = "https://github.com/DiamondLightSource/python3-pip-skeleton"
45+
GitHub = "https://github.com/DiamondLightSource/python3-pip-skeleton-cli"
4446

4547
[[project.authors]] # Further authors may be added by duplicating this section
4648
@@ -96,8 +98,8 @@ skipsdist=True
9698
# Don't create a virtualenv for the command, requires tox-direct plugin
9799
direct = True
98100
passenv = *
99-
allowlist_externals =
100-
pytest
101+
allowlist_externals =
102+
pytest
101103
pre-commit
102104
mypy
103105
sphinx-build

tests/test_adopt.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import subprocess
22
import sys
3-
from configparser import ConfigParser
43
from os import makedirs
54
from pathlib import Path
65

76
import pytest
7+
import toml
88

99
from python3_pip_skeleton import __main__, __version__
1010

@@ -40,10 +40,9 @@ def test_new_module(tmp_path: Path):
4040
"Developer instructions in docs/developer/tutorials/dev-install.rst"
4141
)
4242

43-
conf = ConfigParser()
44-
conf.read(module / "setup.cfg")
45-
assert conf["metadata"]["author"] == "Firstname Lastname"
46-
assert conf["metadata"]["author_email"] == "[email protected]"
43+
conf = toml.load(module / "pyproject.toml")
44+
assert conf["project"]["authors"][0]["email"] == "[email protected]"
45+
assert conf["project"]["authors"][0]["name"] == "Firstname Lastname"
4746
api_rst = module / "docs" / "user" / "reference" / "api.rst"
4847
assert (
4948
"Version number as calculated by https://github.com/pypa/setuptools_scm"
@@ -68,7 +67,6 @@ def test_new_module(tmp_path: Path):
6867
out = ctx.value.args[0]
6968
print(out)
7069
assert "4 failed, 1 passed" in out
71-
assert "Please change description in ./setup.cfg" in out
7270
assert "Please change ./README.rst" in out
7371

7472

0 commit comments

Comments
 (0)