Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit78a82b3

Browse files
committed
Don't access logger in tests by nonpublic attribute
This changes a couple tests that access specific loggers to use thelogger name instead, as code outside GitPython should do.
1 parent7bbccb4 commit78a82b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎test/test_git.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def test_it_uses_shell_or_not_as_specified(self, case):
133133
deftest_it_logs_if_it_uses_a_shell(self,case):
134134
"""``shell=`` in the log message agrees with what is passed to `Popen`."""
135135
value_in_call,value_from_class=case
136-
withself.assertLogs(cmd._logger,level=logging.DEBUG)aslog_watcher:
136+
withself.assertLogs(cmd.__name__,level=logging.DEBUG)aslog_watcher:
137137
mock_safer_popen=self._do_shell_combo(value_in_call,value_from_class)
138138
self._assert_logged_for_popen(log_watcher,"shell",mock_safer_popen.call_args.kwargs["shell"])
139139

@@ -143,7 +143,7 @@ def test_it_logs_if_it_uses_a_shell(self, case):
143143
)
144144
deftest_it_logs_istream_summary_for_stdin(self,case):
145145
expected_summary,istream_argument=case
146-
withself.assertLogs(cmd._logger,level=logging.DEBUG)aslog_watcher:
146+
withself.assertLogs(cmd.__name__,level=logging.DEBUG)aslog_watcher:
147147
self.git.execute(["git","version"],istream=istream_argument)
148148
self._assert_logged_for_popen(log_watcher,"stdin",expected_summary)
149149

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp