Skip to content

Commit 903f224

Browse files
committed
patchtest2: simplify project structure
- Move core logic out of src/patchtest2/tests - Update entrypoint path - Update selftest script Signed-off-by: Trevor Gamblin <[email protected]>
1 parent 15fcb71 commit 903f224

File tree

6 files changed

+4
-5
lines changed

6 files changed

+4
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies = [
3131
]
3232

3333
[project.scripts]
34-
patchtest = "patchtest2.tests.patchtest:run"
34+
patchtest = "patchtest2.patchtest:run"
3535

3636
[project.urls]
3737
Documentation = "https://github.com/Trevor Gamblin/patchtest2#readme"
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import inspect
22
import functools
33

4-
54
def patchtest_result(func):
65
@functools.wraps(func)
76
def wrapper(*args, **kwargs):

src/patchtest2/tests/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import pyparsing
33
import re
44
import unidiff
5-
from patchtest2.tests.results import patchtest_result
5+
from patchtest2.results import patchtest_result
66

77

88
@patchtest_result

src/patchtest2/tests/oe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import pyparsing
33
import re
44
import unidiff
5-
from patchtest2.tests.results import patchtest_result
5+
from patchtest2.results import patchtest_result
66

77
@patchtest_result
88
def test_mbox_commit_message_user_tags(target):

tests/selftests/selftest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def run_patchtest(mbox_file):
4747
try:
4848
# Run patchtest with --patch flag and capture output
4949
result = subprocess.run(
50-
['patchtest', '--patch', mbox_file],
50+
['patchtest', '--patch', mbox_file, '--suites', 'core,oe'],
5151
capture_output=True,
5252
text=True,
5353
timeout=30

0 commit comments

Comments
 (0)