mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-28 12:28:51 -06:00
refactor: move the review's glue to devtools
This commit is contained in:
1 parent
19bcc76c8f
commit
e146a8f349
9 files changed
+40
-29
No files matched your search
+1
-1
@@ -38,7 +38,7 @@ COMMANDS = {
|
||||
),
|
||||
"slots.py": ("packs/slots.py", "resolve/collisions.py", "packs/slotscan.py", "packs/slotreport.py"),
|
||||
"validate_pr.py": (
|
||||
"resolve/review.py", "resolve/reviewfiles.py", "resolve/reviewreport.py",
|
||||
"resolve/review.py", "devtools/reviewfiles.py", "devtools/reviewreport.py",
|
||||
"core/gitclone.py",
|
||||
),
|
||||
"refresh_data_dirs.py": ("packs/datadirs.py", "packs/datadirextract.py"),
|
||||
|
||||
@@ -58,7 +58,7 @@ class GitThatCannotAnswer(unittest.TestCase):
|
||||
proc = subprocess.run(
|
||||
[sys.executable, "-c", (
|
||||
f"import sys; sys.path.insert(0, {str(REPO_ROOT / 'scripts')!r}); "
|
||||
"from resolve import reviewfiles; print(reviewfiles.get_changed_files())"
|
||||
"from devtools import reviewfiles; print(reviewfiles.get_changed_files())"
|
||||
)],
|
||||
cwd=tmp, capture_output=True, text=True, timeout=60, check=False,
|
||||
)
|
||||
@@ -88,14 +88,14 @@ class AProjectMainThatCannotBeFetched(unittest.TestCase):
|
||||
cli.run_cli(worktree.project_base)
|
||||
self.assertEqual(ended.exception.code, 1)
|
||||
self.assertEqual(err.getvalue(), "ERROR: no main\n")
|
||||
from resolve import reviewfiles
|
||||
from devtools import reviewfiles
|
||||
with self.assertRaises(RuntimeError):
|
||||
reviewfiles.get_changed_files()
|
||||
|
||||
def test_both_tools_compare_against_the_same_line(self):
|
||||
from core import gitclone
|
||||
from profiling import worktree
|
||||
from resolve import reviewfiles
|
||||
from devtools import reviewfiles
|
||||
|
||||
diffs: list[tuple[str, ...]] = []
|
||||
|
||||
@@ -130,7 +130,7 @@ class ChangesNotYetCommittedAreRead(unittest.TestCase):
|
||||
proc = subprocess.run(
|
||||
[sys.executable, "-c", (
|
||||
f"import sys; sys.path.insert(0, {str(REPO_ROOT / 'scripts')!r}); "
|
||||
"from resolve import reviewfiles; print(reviewfiles.get_changed_files())"
|
||||
"from devtools import reviewfiles; print(reviewfiles.get_changed_files())"
|
||||
)],
|
||||
cwd=tmp, capture_output=True, text=True, timeout=60, check=False,
|
||||
)
|
||||
@@ -153,7 +153,7 @@ class AForkPushedToItsOwnMain(unittest.TestCase):
|
||||
return subprocess.run(
|
||||
[sys.executable, "-c", (
|
||||
f"import sys; sys.path.insert(0, {str(REPO_ROOT / 'scripts')!r}); "
|
||||
"from resolve import reviewfiles; from core import gitclone; "
|
||||
"from devtools import reviewfiles; from core import gitclone; "
|
||||
f"gitclone.PROJECT_URLS = ({project!r},); "
|
||||
"print(reviewfiles.get_changed_files())"
|
||||
)],
|
||||
|
||||
@@ -16,7 +16,7 @@ import tempfile
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from resolve import reviewfiles
|
||||
from devtools import reviewfiles
|
||||
from resolve import review
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
|
||||
@@ -20,7 +20,7 @@ from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
from resolve import reviewfiles
|
||||
from devtools import reviewfiles
|
||||
from core import gitclone
|
||||
from resolve import review
|
||||
|
||||
|
||||
Reference in new issue
Block a user