Skip to content

Commit

Permalink
👕 ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Hi-king committed Jan 10, 2025
1 parent 43453a6 commit 5fb6c50
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,21 +117,23 @@ def test_load_requires(self):
text = 'test'
output = gokart.build(_LoadRequires(task=_DummyTask(param=text)), reset_register=False)
self.assertEqual(output, text)

def test_build_with_child_task_error(self):
class CheckException(Exception):
pass

class FailTask(gokart.TaskOnKart):
def run(self):
raise CheckException()

try:
t = FailTask()
gokart.build(t, reset_register=False, log_level=logging.CRITICAL)
except GokartBuildError as e:
self.assertEqual(len(e.raised_exceptions), 1)
self.assertIsInstance(e.raised_exceptions[t.make_unique_id()][0], CheckException)


class LoggerConfigTest(unittest.TestCase):
def test_logger_config(self):
for level, enable_expected, disable_expected in (
Expand Down

0 comments on commit 5fb6c50

Please sign in to comment.