-
Notifications
You must be signed in to change notification settings - Fork 94
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
run python ci tests on prerelease branches and pin ipython to <=8.31.0 #6552
run python ci tests on prerelease branches and pin ipython to <=8.31.0 #6552
Conversation
E2E Tests 🚀 |
Hmm, the ipykernel tests are failing even after a rerun with: ====================================================== FAILURES ======================================================
_______________________________________________ test_console_traceback _______________________________________________
shell = <positron.positron_ipkernel.PositronShell object at 0x7f20fdbaad50>
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_console_traceback0')
mock_displayhook = <Mock id='139779566843792'>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f20f5f6ad50>
def test_console_traceback(
shell: PositronShell, tmp_path: Path, mock_displayhook: Mock, monkeypatch
) -> None:
# Ensure that we're in console mode.
monkeypatch.setattr(shell, "session_mode", SessionMode.CONSOLE)
# We follow the approach of IPython's test_ultratb.py, which is to create a temporary module,
# prepend its parent directory to sys.path, import it, then run a cell that calls a function
# from it.
# Create a temporary module.
file = tmp_path / "test_traceback.py"
file.write_text(code)
# Temporarily add the module to sys.path and call a function from it, which should error.
with prepended_to_syspath(str(tmp_path)):
shell.run_cell("import test_traceback; test_traceback.g()")
# NOTE(seem): This is not elegant, but I'm not sure how else to test this than other than to
# compare the beginning of each frame of the traceback. The escape codes make it particularly
# challenging.
path = str(alias_home(file))
uri = file.expanduser().as_uri()
# Define a few OSC8 escape codes for convenience.
esc = "\x1b"
osc8 = esc + "]8"
st = esc + "\\"
# Convenient reference to colors from the active scheme.
> colors = cast(Any, shell.InteractiveTB.Colors)
E AttributeError: 'AutoFormattedTB' object has no attribute 'Colors'
python_files/posit/positron/tests/test_positron_ipkernel.py:162: AttributeError Is the prerelease branch missing a fix for this? EDIT: this is also failing for branches targeting |
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.
LGTM!
without looking into it much, it sort of looks like something in the test requirements got updated and is now breaking. We generally pin all our dependencies, but there's one file that does not: https://github.com/posit-dev/positron/blob/db8f78b2bf2964778b039e8d0e01f02ef70ec3a0/extensions/positron-python/build/test-requirements.txt update to mention that |
5220460
to
4ac7514
Compare
Thank you for this tip!! Pinned |
b9ab841
to
f7be371
Compare
We no longer publish the release binaries as assets, but the `downloadAndUnzipPositron()` function still assumes that we do. This PR updates the script to use the CDN url so we shouldn't see this error anymore when running Python extension MacOS tests: ``` Run GabrielBB/xvfb-action@v1.7 /Users/runner/hostedtoolcache/node/20.12.1/arm64/bin/npm run testDebugger > python@2025.99.0-dev testDebugger > node ./out/test/testBootstrap.js ./out/test/debuggerTest.js Test server listening on port 49253 **************************************************************************************************** Start Debugger tests Using Github PAT from environment variable POSITRON_GITHUB_PAT. End Debugger tests (with errors) Error: No asset found with suffix .dmg for platform darwin at downloadAndUnzipPositron (/Users/runner/work/positron/positron/path with spaces/extensions/positron-python/out/test/positron/testElectron.js:197:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async runTests (/Users/runner/work/positron/positron/path with spaces/extensions/positron-python/out/test/positron/testElectron.js:269:63) Exiting with test failures Killing VSC Error: The process '/Users/runner/hostedtoolcache/node/20.12.1/arm64/bin/npm' failed with exit code 1 ``` ### QA Notes Python Mac OS tests should now pass locally and in CI.
Co-authored-by: Isabel Zimmerman <54685329+isabelizimm@users.noreply.github.com> Signed-off-by: sharon <sharon-wang@users.noreply.github.com>
Error in tests: ``` FAILED python_files/posit/positron/tests/test_positron_ipkernel.py::test_console_traceback - AttributeError: 'AutoFormattedTB' object has no attribute 'Colors' ``` from Isabel: > ipython, which imports AutoFormattedTB had a fresh 9.0.0 release earlier today
4949dae
to
ecf2af1
Compare
Summary
prerelease/2025.03
NOTE: This change will need to go into main as well!