Skip to content

Commit 987e9bb

Browse files
committed
fix: missing flush for grade command prints
1 parent d75fdb5 commit 987e9bb

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ Note that the log for version before v0.1.1 may not be in the mentioned format.
99

1010
## [Unreleased]
1111

12+
## v0.1.2a2 - 2024-10-01
13+
14+
### Changed
15+
16+
- Flush stdout in the grade command.
17+
1218
## v0.1.2a1 - 2024-10-01
1319

1420
### Added

grading_lib/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.2a1
1+
0.1.2a2

grading_lib/cli/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
import click
99

1010
from ..common import MinimalistTestResult, MinimalistTestRunner
11-
from ..util import FindProblemList, get_problem_total_points, load_problems_metadata
11+
from ..util import (FindProblemList, get_problem_total_points,
12+
load_problems_metadata)
1213
from .dev import dev
1314
from .internal import internal
1415

@@ -96,7 +97,7 @@ def grade_command(path: str | Path) -> None:
9697
current_sys_path = copy.copy(sys.path)
9798
test_programs = []
9899
for idx, problem_name in enumerate(problem_names, start=1):
99-
print(f"{idx} - Grading {problem_name} ")
100+
print(f"{idx} - Grading {problem_name} ", flush=True)
100101

101102
try:
102103
os.chdir(problem_name)
@@ -120,7 +121,7 @@ def grade_command(path: str | Path) -> None:
120121
# every problem.
121122
del sys.modules["scripts.grade"]
122123

123-
print("\n\n")
124+
print("\n\n", flush=True)
124125

125126
# Summary.
126127
print("==== Summary ====")

0 commit comments

Comments
 (0)