Skip to content

Commit

Permalink
commands: fix types for test command
Browse files Browse the repository at this point in the history
  • Loading branch information
kiritofeng committed Dec 26, 2023
1 parent 2a22a33 commit c0b794f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dmoj/commands/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ class ProblemTester(Tester):
def run_problem_tests(self, problem_id: str) -> int:
self.output(ansi_style(f'Testing problem #ansi[{problem_id}](cyan|bold)...'))

config = ProblemConfig(ProblemDataManager(get_problem_root(problem_id)))
problem_root = get_problem_root(problem_id)
assert problem_root is not None
config = ProblemConfig(ProblemDataManager(problem_root))

if not config or 'tests' not in config or not config['tests']:
self.output(ansi_style('\t#ansi[Skipped](magenta|bold) - No tests found'))
Expand Down

0 comments on commit c0b794f

Please sign in to comment.