Skip to content

Commit 9862782

Browse files
committed
troubleshooting an issue with magics and output capture
1 parent 0d74392 commit 9862782

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/unit/test_magics.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,9 +1094,14 @@ def test_bigquery_magic_saves_query_job_to_variable_on_error(
10941094
ip = IPython.get_ipython()
10951095
monkeypatch.setattr(bigquery, "bigquery_magics", None)
10961096
bigquery.load_ipython_extension(ip)
1097-
magics.context.credentials = mock.create_autospec(
1098-
google.auth.credentials.Credentials, instance=True
1097+
monkeypatch.setattr(
1098+
magics.context,
1099+
"credentials",
1100+
mock.create_autospec(google.auth.credentials.Credentials, instance=True),
10991101
)
1102+
# magics.context.credentials = mock.create_autospec(
1103+
# google.auth.credentials.Credentials, instance=True
1104+
# )
11001105

11011106
ipython_ns_cleanup.append((ip, "result"))
11021107

0 commit comments

Comments
 (0)