Sourcing python-remove-tests-dir-hook Sourcing python-catch-conflicts-hook.sh Sourcing python-remove-bin-bytecode-hook.sh Sourcing pypa-build-hook Using pypaBuildPhase Sourcing python-runtime-deps-check-hook Using pythonRuntimeDepsCheckHook Sourcing pypa-install-hook Using pypaInstallPhase Sourcing python-imports-check-hook.sh Using pythonImportsCheckPhase Sourcing python-namespaces-hook Sourcing python-catch-conflicts-hook.sh Sourcing pytest-check-hook Using pytestCheckPhase Running phase: unpackPhase unpacking source archive /nix/store/0i9fi1rwnq8nlsdd37rjv466j4ls9n7w-source source root is source setting SOURCE_DATE_EPOCH to timestamp 315619200 of file "source/tox.ini" Running phase: patchPhase Running phase: updateAutotoolsGnuConfigScriptsPhase Running phase: configurePhase no configure script, doing nothing Running phase: buildPhase Executing pypaBuildPhase Creating a wheel... pypa build flags: --no-isolation --outdir dist/ --wheel * Getting build dependencies for wheel... * Building wheel... The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. Successfully built rich-14.3.3-py3-none-any.whl Finished creating a wheel... Finished executing pypaBuildPhase Running phase: pythonRuntimeDepsCheckHook Executing pythonRuntimeDepsCheck Checking runtime dependencies for rich-14.3.3-py3-none-any.whl Finished executing pythonRuntimeDepsCheck Running phase: installPhase Executing pypaInstallPhase Successfully installed rich-14.3.3-py3-none-any.whl Finished executing pypaInstallPhase Running phase: pythonOutputDistPhase Executing pythonOutputDistPhase Finished executing pythonOutputDistPhase Running phase: fixupPhase shrinking RPATHs of ELF executables and libraries in /nix/store/l64fjgwsz3jhqgrpy4cva9ga00v6h0gc-python3.13-rich-14.3.3 checking for references to /build/ in /nix/store/l64fjgwsz3jhqgrpy4cva9ga00v6h0gc-python3.13-rich-14.3.3... patching script interpreter paths in /nix/store/l64fjgwsz3jhqgrpy4cva9ga00v6h0gc-python3.13-rich-14.3.3 stripping (with command strip and flags -S -p) in /nix/store/l64fjgwsz3jhqgrpy4cva9ga00v6h0gc-python3.13-rich-14.3.3/lib shrinking RPATHs of ELF executables and libraries in /nix/store/whszla8d5gc9l4lwpsw2afmainldcf10-python3.13-rich-14.3.3-dist checking for references to /build/ in /nix/store/whszla8d5gc9l4lwpsw2afmainldcf10-python3.13-rich-14.3.3-dist... patching script interpreter paths in /nix/store/whszla8d5gc9l4lwpsw2afmainldcf10-python3.13-rich-14.3.3-dist Executing pythonRemoveTestsDir Finished executing pythonRemoveTestsDir Running phase: installCheckPhase no Makefile or custom installCheckPhase, doing nothing Running phase: pythonCatchConflictsPhase Running phase: pythonRemoveBinBytecodePhase Running phase: pythonImportsCheckPhase Executing pythonImportsCheckPhase Check whether the following modules can be imported: rich Running phase: pytestCheckPhase Executing pytestCheckPhase pytest flags: -m pytest ============================= test session starts ============================== platform linux -- Python 3.13.17, pytest-9.0.3, pluggy-1.6.0 rootdir: /build/source configfile: pyproject.toml testpaths: tests collected 977 items tests/test_align.py ................ [ 1%] tests/test_ansi.py ....................... [ 3%] tests/test_bar.py ....... [ 4%] tests/test_block_bar.py .... [ 5%] tests/test_box.py ........ [ 5%] tests/test_card.py . [ 6%] tests/test_cells.py .................................................... [ 11%] ................. [ 13%] tests/test_color.py ................. [ 14%] tests/test_color_triplet.py ... [ 15%] tests/test_columns.py . [ 15%] tests/test_columns_align.py . [ 15%] tests/test_console.py .................................................. [ 20%] .............................................F... [ 25%] tests/test_constrain.py . [ 25%] tests/test_containers.py .... [ 25%] tests/test_control.py ....... [ 26%] tests/test_emoji.py ...... [ 27%] tests/test_file_proxy.py ... [ 27%] tests/test_filesize.py .. [ 27%] tests/test_getfileno.py ... [ 28%] tests/test_highlighter.py .............................................. [ 32%] ..................................... [ 36%] tests/test_inspect.py ...s....sss................................... [ 41%] tests/test_json.py . [ 41%] tests/test_jupyter.py ... [ 41%] tests/test_layout.py ...... [ 42%] tests/test_live.py ........... [ 43%] tests/test_live_render.py .... [ 43%] tests/test_log.py ... [ 44%] tests/test_logging.py .... [ 44%] tests/test_markdown.py ....... [ 45%] tests/test_markdown_no_hyperlinks.py . [ 45%] tests/test_markup.py ..................... [ 47%] tests/test_measure.py .... [ 48%] tests/test_null_file.py . [ 48%] tests/test_padding.py ..... [ 48%] tests/test_palette.py . [ 48%] tests/test_panel.py ............. [ 50%] tests/test_pick.py . [ 50%] tests/test_pretty.py ............................................s...... [ 55%] . [ 55%] tests/test_progress.py ....................................... [ 59%] tests/test_prompt.py ........ [ 60%] tests/test_protocol.py ...... [ 60%] tests/test_ratio.py ....... [ 61%] tests/test_repr.py ........ [ 62%] tests/test_rich_print.py ....... [ 63%] tests/test_rule.py ................ [ 64%] tests/test_rule_in_table.py .... [ 65%] tests/test_screen.py . [ 65%] tests/test_segment.py .................................................. [ 70%] ........... [ 71%] tests/test_spinner.py ..... [ 72%] tests/test_stack.py . [ 72%] tests/test_status.py .. [ 72%] tests/test_style.py ........................... [ 75%] tests/test_styled.py . [ 75%] tests/test_syntax.py ......................... [ 77%] tests/test_table.py ..................... [ 79%] tests/test_text.py ..................................................... [ 85%] ............................................................ [ 91%] tests/test_theme.py ..... [ 92%] tests/test_tools.py .... [ 92%] tests/test_traceback.py ...................s... [ 94%] tests/test_tree.py .....s.s. [ 95%] tests/test_unicode_data.py ......................... [ 98%] tests/test_windows_renderer.py sssssssssssssssss [100%] =================================== FAILURES =================================== _____________________________ test_brokenpipeerror _____________________________ @pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows") def test_brokenpipeerror() -> None: """Test BrokenPipe works as expected.""" which_py, which_head = (["which", cmd] for cmd in ("python", "head")) rich_cmd = "python -m rich".split() for cmd in [which_py, which_head, rich_cmd]: check = subprocess.run(cmd).returncode if check != 0: return # Only test on suitable Unix platforms head_cmd = "head -1".split() proc1 = subprocess.Popen(rich_cmd, stdout=subprocess.PIPE) proc2 = subprocess.Popen(head_cmd, stdin=proc1.stdout, stdout=subprocess.PIPE) proc1.stdout.close() output, _ = proc2.communicate() proc1.wait() proc2.wait() > assert proc1.returncode == 1 E AssertionError: assert 0 == 1 E + where 0 = .returncode tests/test_console.py:1016: AssertionError ----------------------------- Captured stdout call ----------------------------- /nix/store/rw8h5xwslwh5czjsfpxr3z7hmxcb28pn-python3-3.13.17/bin/python /nix/store/f2jmqpvrz2d2m3iw9i9zjkggh4na5jcs-coreutils-9.11/bin/head Rich features Colors ✓ 4-bit color ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ✓ 8-bit color ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ✓ Truecolor (16.7 million) ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ✓ Dumb terminals ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ✓ Automatic color conversion ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ Styles All ansi styles: bold, dim, italic, underline, strikethrough, reverse, and even blink. Text Word wrap text. Justify left, center, right or full. Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum dolor sit amet, dolor sit amet, dolor sit amet, dolor sit amet, consectetur consectetur consectetur consectetur adipiscing adipiscing adipiscing elit. adipiscing elit. elit. Quisque elit. Quisque Quisque in metus Quisque in metus in metus sed in metus sed sed sapien sed sapien sapien sapien ultricies ultricies ultricies ultricies pretium a at pretium a at pretium a at pretium a at justo. Maecenas justo. Maecenas justo. Maecenas justo. Maecenas luctus velit et luctus velit et luctus velit et luctus velit et auctor maximus. auctor maximus. auctor maximus. auctor maximus. Asian 🇨🇳 该库支持中文,日文和韩文文本! language 🇯🇵 support ライブラリは中国語、日本語、韓国語のテキストをサポートしています 🇰🇷 이 라이브러리는 중국어, 일본어 및 한국어 텍스트를 지원합니다 Markup Rich supports a simple bbcode-like markup for color, style, and emoji! 👍 🍎 🐜 🐻 🥖 🚌 Tables Date Title Production Budget Box Office ───────────────────────────────────────────────────────────────── Dec 20, 2019 Star Wars: $275,000,000 $375,126,118 The Rise of Skywalker May 25, 2018 Solo: A $275,000,000 $393,151,347 Star Wars Story Dec 15, 2017 Star Wars $262,000,000 $1,332,539,889 Ep. VIII: The Last Jedi May 19, 1999 Star Wars $115,000,000 $1,027,044,677 Ep. I: The phantom Menace Syntax 1 def iter_last(values: Itera { highlighting 2 │ """Iterate and generate │ 'foo': [ & 3 │ iter_values = iter(valu │ │ 3.1427, pretty 4 │ try: │ │ ( printing 5 │ │ previous_value = ne │ │ │ 'Paul Atreides', 6 │ except StopIteration: │ │ │ 'Vladimir 7 │ │ return Harkonnen', 8 │ for value in iter_value │ │ │ 'Thufir Hawat' 9 │ │ yield False, previo │ │ ) 10 │ │ previous_value = va │ ], 11 │ yield True, previous_va │ 'atomic': ( │ │ False, │ │ True, │ │ None │ ) } Markdown # Markdown Markdown Supports much of the *markdown* Supports much of the markdown __syntax__! syntax! - Headers • Headers - Basic formatting: **bold**, • Basic formatting: bold, *italic*, `code` italic, code - Block quotes • Block quotes - Lists, and more... • Lists, and more... +more! Progress bars, columns, styled logging handler, tracebacks, etc... rendered in 81.4ms (cold cache) rendered in 33.5ms (warm cache) ╭─────────────────────── Help ensure Rich is maintained ───────────────────────╮ │ │ │ Hope you enjoy using Rich! │ │ │ │ Consider sponsoring to ensure this project is maintained. │ │ │ │ https://github.com/sponsors/willmcgugan │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ =========================== short test summary info ============================ FAILED tests/test_console.py::test_brokenpipeerror - AssertionError: assert 0 == 1 ================== 1 failed, 951 passed, 25 skipped in 8.54s ===================