-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppress heavy logs on test (fix #284) #285
Suppress heavy logs on test (fix #284) #285
Conversation
@@ -88,7 +92,7 @@ def test_build_dict_outputs(self): | |||
|
|||
def test_failed_task(self): | |||
with self.assertRaises(GokartBuildError): | |||
gokart.build(_DummyFailedTask(), reset_register=False) | |||
gokart.build(_DummyFailedTask(), reset_register=False, log_level=logging.CRITICAL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fail message is ERROR level, but not essential in this test
@@ -53,6 +53,8 @@ def run(self): | |||
class RunTest(unittest.TestCase): | |||
|
|||
def setUp(self): | |||
luigi.setup_logging.DaemonLogging._configured = False | |||
luigi.setup_logging.InterfaceLogging._configured = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same way as testing of luigi
https://github.com/spotify/luigi/blob/4d0576c7c265afcb228097af79f316ba0de0242c/test/cmdline_test.py#L110
@@ -31,7 +37,7 @@ def test_make_tree_info_complete(self): | |||
task = _Task(param=1, sub=_SubTask(param=2)) | |||
|
|||
# check after sub task runs | |||
luigi.build([task], local_scheduler=True) | |||
gokart.build(task, reset_register=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not essential change, but more handy to use gokart.build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Hi-king LGTM!
Fixes #284
FIXES
luigi.setup_logging
configs on each setUp and tearDownluigi
namespacePROBLEMS: heavy logs
https://github.com/m3dev/gokart/runs/6319432334?check_suite_focus=true
Reason1: cache of logging cofiguration
gokart/test/test_pandas_type_check_framework.py
Line 64 in 210e282
Reason2: gokart.build(log_level=...) only set log_level of
gokart
namespaceInfo level logs from
luigi
namespace had been shown.