Skip to content

Commit

Permalink
Merge pull request #550 from dodona-edu/chore/add-diff-to-linter
Browse files Browse the repository at this point in the history
Add diff to isort output
  • Loading branch information
jorg-vr authored Oct 21, 2024
2 parents 9595278 + 886c785 commit 09f20a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: echo "${GITHUB_WORKSPACE}" >> $GITHUB_PATH
- run: nix develop .#format -c poetry run isort --check-only ./tested ./tests
- run: nix develop .#format -c poetry run isort --check-only --diff ./tested ./tests
- run: nix develop .#format -c poetry run black --check ./tested ./tests
types:
if: ${{ github.event.action != 'labeled' || (github.event.action == 'labeled' && github.event.label.name == 'run tests') }}
Expand Down
12 changes: 9 additions & 3 deletions tests/test_functionality.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from tested.configs import create_bundle
from tested.features import Construct
from tested.judge.execution import ExecutionResult
from tested.languages import get_language, LANGUAGES
from tested.languages import LANGUAGES, get_language
from tested.languages.generation import get_readable_input
from tested.testsuite import Context, MainInput, Suite, Tab, Testcase, TextData
from tests.language_markers import (
Expand All @@ -32,7 +32,10 @@ def test_global_variable(language: str, tmp_path: Path, pytestconfig: pytest.Con
conf = configuration(
pytestconfig, "global", language, tmp_path, "one.tson", "correct"
)
if Construct.GLOBAL_VARIABLES not in get_language(None, conf.programming_language).supported_constructs():
if (
Construct.GLOBAL_VARIABLES
not in get_language(None, conf.programming_language).supported_constructs()
):
pytest.skip("Language doesn't support global variables")
result = execute_config(conf)
updates = assert_valid_output(result, pytestconfig)
Expand All @@ -46,7 +49,10 @@ def test_global_variable_yaml(
conf = configuration(
pytestconfig, "global", language, tmp_path, "plan.yaml", "correct"
)
if Construct.GLOBAL_VARIABLES not in get_language(None, conf.programming_language).supported_constructs():
if (
Construct.GLOBAL_VARIABLES
not in get_language(None, conf.programming_language).supported_constructs()
):
pytest.skip("Language doesn't support global variables")
result = execute_config(conf)
updates = assert_valid_output(result, pytestconfig)
Expand Down

0 comments on commit 09f20a7

Please sign in to comment.