Commit 27ff3a8
authored
fix: adds magics.context.project to eliminate issues with unit tests … (#2228)
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
```1 parent 37e4e0e commit 27ff3a8
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
986 | 986 | | |
987 | 987 | | |
988 | 988 | | |
| 989 | + | |
989 | 990 | | |
990 | 991 | | |
991 | 992 | | |
| |||
1007 | 1008 | | |
1008 | 1009 | | |
1009 | 1010 | | |
| 1011 | + | |
1010 | 1012 | | |
1011 | 1013 | | |
1012 | 1014 | | |
| |||
1035 | 1037 | | |
1036 | 1038 | | |
1037 | 1039 | | |
| 1040 | + | |
1038 | 1041 | | |
1039 | 1042 | | |
1040 | 1043 | | |
| |||
1064 | 1067 | | |
1065 | 1068 | | |
1066 | 1069 | | |
| 1070 | + | |
1067 | 1071 | | |
1068 | 1072 | | |
1069 | 1073 | | |
| |||
1098 | 1102 | | |
1099 | 1103 | | |
1100 | 1104 | | |
| 1105 | + | |
1101 | 1106 | | |
1102 | 1107 | | |
1103 | 1108 | | |
| |||
0 commit comments