Skip to content

Commit 8b19847

Browse files
committed
fix test formatting
1 parent fd26f49 commit 8b19847

4 files changed

Lines changed: 17 additions & 15 deletions

File tree

tests/test_docker.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
"""Tests for all docker functions."""
2-
from unittest import IsolatedAsyncioTestCase, main as run_tests
32
from pathlib import Path
3+
from unittest import IsolatedAsyncioTestCase, main as run_tests
44

5-
from algobattle.program import Generator, Solver
65
from algobattle.match import AlgobattleConfig, MatchConfig, RunConfig
6+
from algobattle.program import Generator, Solver
7+
78
from . import testsproblem
8-
from .testsproblem.problem import TestProblem, TestInstance, TestSolution
9+
from .testsproblem.problem import TestInstance, TestProblem, TestSolution
910

1011

1112
class ProgramTests(IsolatedAsyncioTestCase):

tests/test_match.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
"""Tests for the Match class."""
22
# pyright: reportMissingSuperCall=false
3+
from pathlib import Path
34
from typing import Any
45
from unittest import IsolatedAsyncioTestCase, TestCase, main
5-
from pathlib import Path
66

77
from pydantic import ByteSize, ValidationError
88

9-
from algobattle.battle import Fight, Iterated, Averaged, ProgramRunInfo
9+
from algobattle.battle import Averaged, Fight, Iterated, ProgramRunInfo
1010
from algobattle.match import (
11+
AlgobattleConfig,
1112
DynamicProblemConfig,
12-
MatchupStr,
13-
ProjectConfig,
1413
Match,
15-
AlgobattleConfig,
1614
MatchConfig,
15+
MatchupStr,
16+
ProjectConfig,
1717
RunConfig,
1818
TeamInfo,
1919
)
20-
from algobattle.program import Team, Matchup, TeamHandler
20+
from algobattle.program import Matchup, Team, TeamHandler
21+
2122
from .testsproblem.problem import TestProblem
2223

2324

tests/test_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
from pydantic import ValidationError
77

8-
from algobattle.problem import InstanceModel, AttributeReference, SelfRef
9-
from algobattle.util import Role
8+
from algobattle.problem import AttributeReference, InstanceModel, SelfRef
109
from algobattle.types import Ge, Interval, LaxComp, SizeIndex, UniqueItems
10+
from algobattle.util import Role
1111

1212

1313
class ModelCreationTests(TestCase):

tests/test_util.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
"""Tests for all util functions."""
2-
from math import inf
32
import unittest
3+
from math import inf
44

5-
from algobattle.battle import Battle, Iterated, Averaged
5+
from algobattle.battle import Averaged, Battle, Iterated
66
from algobattle.problem import InstanceModel, SolutionModel, default_score
77
from algobattle.util import Role
88

99

10-
class DummyInstance(InstanceModel): # noqa: D101
10+
class DummyInstance(InstanceModel):
1111
@property
1212
def size(self) -> int:
1313
return 1
1414

1515

16-
class DummySolution(SolutionModel[DummyInstance]): # noqa: D101
16+
class DummySolution(SolutionModel[DummyInstance]):
1717
val: float
1818

1919
def score(self, instance: DummyInstance, role: Role) -> float:

0 commit comments

Comments
 (0)