Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.12.0
rev: 26.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
Expand Down
1 change: 0 additions & 1 deletion server/autotest_server/testers/jupyter/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from msgspec import Meta, Struct
from markus_autotesting_core.types import AutotestFile, BaseTestData, BaseTesterSettings


PYTHON_VERSIONS = [f"3.{x}" for x in range(11, 14) if shutil.which(f"python3.{x}")]
PythonVersion = Enum("PythonVersion", {v.replace(".", "_"): v for v in PYTHON_VERSIONS})

Expand Down
1 change: 0 additions & 1 deletion server/autotest_server/testers/py/lib/c_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from typing import Optional, List
import unittest


DEFAULT_LTRACE_LOG_FILE = "ltrace_log.txt"
DEFAULT_GCC_FLAGS = ["-std=gnu99", "-Wall", "-g"]
DEFAULT_LTRACE_FLAGS = ["-f", "-n", "2", "-o", DEFAULT_LTRACE_LOG_FILE]
Expand Down
1 change: 0 additions & 1 deletion server/autotest_server/testers/py/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from msgspec import Meta, Struct
from markus_autotesting_core.types import BaseTestData, BaseTesterSettings


PYTHON_VERSIONS = [f"3.{x}" for x in range(11, 14) if shutil.which(f"python3.{x}")]
PythonVersion = Enum("PythonVersion", {v.replace(".", "_"): v for v in PYTHON_VERSIONS})

Expand Down
16 changes: 4 additions & 12 deletions server/autotest_server/tests/testers/py/test_py_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
def test_success(request, monkeypatch) -> None:
"""Test that when a test succeeds, it is added to the results."""
monkeypatch.chdir(request.fspath.dirname)
tester = PyTester(
specs=TestSpecs.from_json(
"""
tester = PyTester(specs=TestSpecs.from_json("""
{
"test_data": {
"script_files": ["fixtures/sample_tests_success.py"],
Expand All @@ -22,9 +20,7 @@ def test_success(request, monkeypatch) -> None:
}
}
}
"""
)
)
"""))
results = tester.run_python_tests()
assert len(results) == 1
assert "fixtures/sample_tests_success.py" in results
Expand All @@ -41,9 +37,7 @@ def test_success(request, monkeypatch) -> None:
def test_skip(request, monkeypatch) -> None:
"""Test that when a test is skipped, it is omitted from the results."""
monkeypatch.chdir(request.fspath.dirname)
tester = PyTester(
specs=TestSpecs.from_json(
"""
tester = PyTester(specs=TestSpecs.from_json("""
{
"test_data": {
"script_files": ["fixtures/sample_tests_skip.py"],
Expand All @@ -57,8 +51,6 @@ def test_skip(request, monkeypatch) -> None:
}
}
}
"""
)
)
"""))
results = tester.run_python_tests()
assert results == {"fixtures/sample_tests_skip.py": []}
8 changes: 2 additions & 6 deletions server/autotest_server/tests/testers/r/test_r_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ def test_success_with_context(request, monkeypatch):
mock_process.stderr = ""

with patch("subprocess.run", return_value=mock_process):
tester = RTester(
specs=TestSpecs.from_json(
"""
tester = RTester(specs=TestSpecs.from_json("""
{
"test_data": {
"script_files": ["fixtures/sample_tests_success.R"],
Expand All @@ -40,9 +38,7 @@ def test_success_with_context(request, monkeypatch):
}
}
}
"""
)
)
"""))

results = tester.run_r_tests()

Expand Down