Skip to content

Commit 635aea0

Browse files
committed
WIP: add pyproject.toml, test_toml.py; deleted setup.py to avoid overwriting with pyproject.toml
target to fix: issue #256
1 parent 50631bd commit 635aea0

File tree

3 files changed

+2
-114
lines changed

3 files changed

+2
-114
lines changed

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ dev = [
6565
[project.urls]
6666
Homepage = "https://github.com/policyengine/policyengine-core"
6767

68-
[tool.setuptools.packages.find]
69-
exclude = ["tests*"]
70-
7168
[tool.setuptools]
7269
include-package-data = true
7370

setup.py

Lines changed: 0 additions & 83 deletions
This file was deleted.

test_toml.py renamed to tests/core/test_toml.py

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22
import subprocess
33
import tomli
44
import pytest
5-
from packaging import version
65

76

87
@pytest.fixture(scope="module")
98
def toml_data():
10-
file_path = "pyproject.toml"
9+
file_path = "../../pyproject.toml"
1110
if not os.path.exists(file_path):
1211
pytest.fail("pyproject.toml not found in the current directory.")
1312
with open(file_path, "rb") as f:
1413
return tomli.load(f)
1514

1615

1716
def test_toml_syntax():
18-
file_path = "pyproject.toml"
17+
file_path = "../../pyproject.toml"
1918
try:
2019
with open(file_path, "rb") as f:
2120
tomli.load(f)
@@ -37,28 +36,3 @@ def test_build_system(toml_data):
3736
assert (
3837
"build-backend" in build_system
3938
), "Build system 'build-backend' is missing."
40-
41-
42-
def test_package_build():
43-
try:
44-
subprocess.run(["python", "-m", "build"], check=True)
45-
except subprocess.CalledProcessError:
46-
pytest.fail("Failed to build package.")
47-
48-
49-
def test_package_installation():
50-
try:
51-
subprocess.run(["pip", "install", "."], check=True)
52-
except subprocess.CalledProcessError:
53-
pytest.fail("Failed to install package.")
54-
55-
56-
def test_run_tests():
57-
try:
58-
subprocess.run(["pytest"], check=True)
59-
except subprocess.CalledProcessError:
60-
pytest.fail("Some tests failed.")
61-
except FileNotFoundError:
62-
pytest.skip(
63-
"pytest not found. Make sure it's installed and in your PATH."
64-
)

0 commit comments

Comments
 (0)