Skip to content

Commit 77a2c66

Browse files
committed
move test to project root
1 parent fb7090f commit 77a2c66

21 files changed

+23
-19
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ PACKAGES_ALLOW_PRERELEASES?=false
124124
# The command which gets executed. Defaults to the location the
125125
# :ref:`run-tests` template gets rendered to if configured.
126126
# Default: .mxmake/files/run-tests.sh
127-
TEST_COMMAND?=LANG=en_US.UTF-8 pytest -vvv src
127+
TEST_COMMAND?=LANG=en_US.UTF-8 pytest -vvv tests
128128

129129
# Additional Python requirements for running tests to be
130130
# installed (via pip).

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ packages = ["src/mxdev"]
6565
[tool.hatch.build.targets.sdist]
6666
include = [
6767
"/src",
68+
"/tests",
6869
"/example",
6970
"/README.md",
7071
"/CONTRIBUTING.md",
@@ -105,7 +106,7 @@ path = "LICENSE.md"
105106
minversion = "6.0"
106107
addopts = "-ra -q"
107108
testpaths = [
108-
"src",
109+
"tests",
109110
]
110111

111112
[tool.isort]
@@ -143,7 +144,7 @@ uv_resolution = "highest"
143144
pass_env = ["LC_ALL", "LANG", "HOME"]
144145
commands = [
145146
["uv", "pip", "install", "-e", ".[test]"],
146-
["pytest", "--cov", "--cov-report=term", "--cov-branch", "{posargs:src}"]
147+
["pytest", "--cov", "--cov-report=term", "--cov-branch", "{posargs:tests}"]
147148
]
148149

149150
[tool.tox.env.lint]

src/mxdev/tests/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from .utils import Process
2-
31
import os
42
import pytest
53

4+
from utils import Process
5+
66

77
@pytest.fixture
88
def tempdir(tmp_path):
@@ -24,7 +24,7 @@ def src(tempdir):
2424

2525
@pytest.fixture
2626
def mkgitrepo(tempdir):
27-
from .utils import GitRepo
27+
from utils import GitRepo
2828

2929
def _mkgitrepo(name):
3030
repository = GitRepo(tempdir / name)
@@ -41,7 +41,7 @@ def git_allow_file_protocol():
4141
Allow file protocol
4242
This is needed for the submodule to be added from a local path
4343
"""
44-
from .utils import GitRepo
44+
from utils import GitRepo
4545

4646
shell = Process()
4747
file_allow = (
@@ -56,7 +56,7 @@ def git_allow_file_protocol():
5656

5757
@pytest.fixture
5858
def develop(src):
59-
from mxdev.tests.utils import MockDevelop
59+
from utils import MockDevelop
6060

6161
develop = MockDevelop()
6262
develop.sources_dir = src
File renamed without changes.

0 commit comments

Comments
 (0)