Skip to content

Commit

Permalink
Fix circular import when running tests individually
Browse files Browse the repository at this point in the history
  • Loading branch information
caizixian committed Jan 6, 2024
1 parent a8c730d commit c4ad04b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
pip install .[tests]
- name: Test with pytest
run: |
pytest
for f in tests/test_*.py; do pytest "$f"; done
mypy:
runs-on: ubuntu-latest
strategy:
Expand Down
3 changes: 2 additions & 1 deletion src/running/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from running.util import smart_quote, split_quoted
from pathlib import Path
from copy import deepcopy
from running import suite
import os
from enum import Enum

Expand Down Expand Up @@ -111,6 +110,8 @@ def to_string(self, runtime: Runtime) -> str:
def run(
self, runtime: Runtime, cwd: Optional[Path] = None
) -> Tuple[bytes, bytes, SubprocessrExit]:
from running import suite

if suite.is_dry_run():
print(self.to_string(runtime), file=sys.stderr)
return b"", b"", SubprocessrExit.Dryrun
Expand Down
4 changes: 1 addition & 3 deletions src/running/suite.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
from pathlib import Path
from typing import Any, Dict, Optional, Union, List, Sequence
from typing import Any, Dict, Optional, Union
from running.benchmark import (
JavaBenchmark,
BinaryBenchmark,
Benchmark,
JavaScriptBenchmark,
JuliaBenchmark,
)
from running.runtime import OpenJDK, Runtime
from running.modifier import JVMArg, Modifier
import logging
from running.util import register, split_quoted
import os.path
Expand Down

0 comments on commit c4ad04b

Please sign in to comment.