Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

fix: adds magics.context.project to eliminate issues with unit tests … - #2228

Merged
gcf-merge-on-green[bot] merged 1 commit into
mainfrom
fix-magics-are-broken
Jul 2, 2025
Merged

fix: adds magics.context.project to eliminate issues with unit tests …#2228
gcf-merge-on-green[bot] merged 1 commit into
mainfrom
fix-magics-are-broken

Conversation

@chalmerlowe

Copy link
Copy Markdown
Collaborator

Adds magics.context.project to eliminate issues with unit tests in an upcoming PR.

Several magics unit tests fail with an error message.

If the test does not have knowledge of the project, it attempts to initiate a login sequence to be able to get the project identifier. The login cannot complete because the process is running in an ipython interpreter and pytest does not capture any input. This change provides an explicit reference to a project to avoid that process.

Please visit this URL to authorize this application: [REDACTED DUE TO SPACE REASONS]
self = <_pytest.capture.DontReadFromInput object at 0x7f55d6821bd0>, size = -1
def read(self, size: int = -1) -> str:
> raise OSError(
"pytest: reading from stdin while output is captured! Consider using `-s`.")
E OSError: pytest: reading from stdin while output is captured! Consider using `-s`.
.nox/unit-3-11/lib/python3.11/site-packages/_pytest/capture.py:229: OSError

@chalmerlowe
chalmerlowe requested a review from LinchinJuly 2, 2025 17:27
@chalmerlowechalmerlowe self-assigned this Jul 2, 2025
@chalmerlowe
chalmerlowe requested review from a teamJuly 2, 2025 17:27
@product-auto-labelproduct-auto-labelBot added size: xs Pull request size is extra small. api: bigquery Issues related to the googleapis/python-bigquery API. labels Jul 2, 2025
@chalmerlowechalmerlowe added the automerge Merge the pull request once unit tests and other checks pass. label Jul 2, 2025
@gcf-merge-on-green
gcf-merge-on-greenBot merged commit 27ff3a8 into mainJul 2, 2025
@gcf-merge-on-greengcf-merge-on-greenBot removed the automerge Merge the pull request once unit tests and other checks pass. label Jul 2, 2025
@gcf-merge-on-green
gcf-merge-on-greenBot deleted the fix-magics-are-broken branch July 2, 2025 21:00
@release-pleaserelease-pleaseBot mentioned this pull request Jul 2, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.size: xsPull request size is extra small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@chalmerlowe@Linchin