From 815a267708b72ec99c70b92d93a2a6001f4db1a0 Mon Sep 17 00:00:00 2001 From: SamLukeYes Date: Sun, 22 Mar 2026 00:33:17 +0800 Subject: [PATCH 1/2] xonsh: clean up disabled tests --- pkgs/by-name/xo/xonsh/unwrapped.nix | 63 ++++++++++++++--------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/pkgs/by-name/xo/xonsh/unwrapped.nix b/pkgs/by-name/xo/xonsh/unwrapped.nix index e9f16502d6e3..a47c0f437d7c 100644 --- a/pkgs/by-name/xo/xonsh/unwrapped.nix +++ b/pkgs/by-name/xo/xonsh/unwrapped.nix @@ -19,6 +19,9 @@ pytestCheckHook, requests, + man, + util-linux, + coreutils, nix-update-script, @@ -60,48 +63,44 @@ buildPythonPackage rec { pytest-subprocess pytestCheckHook requests + + # required by test_man_completion + man + util-linux ]; disabledTests = [ # fails on sandbox - "test_bsd_man_page_completions" "test_colorize_file" - "test_loading_correctly" - "test_no_command_path_completion" "test_xonsh_activator" - # fails on non-interactive shells - "test_bash_and_is_alias_is_only_functional_alias" - "test_capture_always" - "test_casting" - "test_command_pipeline_capture" - "test_dirty_working_directory" - "test_man_completion" - "test_vc_get_branch" - - # flaky tests - "test_alias_stability" - "test_alias_stability_exception" - "test_complete_import" + # flaky tests in test_integrations.py "test_script" + "test_catching_system_exit" + "test_catching_exit_signal" + "test_alias_stability" + "test_captured_subproc_is_not_affected_next_command" + "test_spec_decorator_alias" + "test_alias_stability_exception" + + # flaky tests in test_python.py + "test_complete_import" + + # flaky tests in test_pipelines.py + "test_command_pipeline_capture" + "test_remove_hide_escape" + + # flaky tests in test_specs.py + "test_capture_always" + "test_callias_captured_redirect" + "test_interrupted_process_returncode" + "test_proc_raise_subproc_error" + "test_specs_with_suspended_captured_process_pipeline" "test_subproc_output_format" - # broken tests - "test_repath_backslash" - - # https://github.com/xonsh/xonsh/issues/5569 - "test_spec_decorator_alias_output_format" - "test_trace_in_script" - ]; - - disabledTestPaths = [ - # fails on sandbox - "tests/completers/test_command_completers.py" - "tests/shell/test_ptk_highlight.py" - - # fails on non-interactive shells - "tests/prompt/test_gitstatus.py" - "tests/completers/test_bash_completer.py" + # flaky tests in test_vc.py + "test_vc_get_branch" + "test_dirty_working_directory" ]; # https://github.com/NixOS/nixpkgs/issues/248978 From e1e70b7ec4e45db5e961b7b6caede1ddb0e43c83 Mon Sep 17 00:00:00 2001 From: SamLukeYes Date: Sun, 22 Mar 2026 13:36:45 +0800 Subject: [PATCH 2/2] xonsh: disable failing tests on darwin --- pkgs/by-name/xo/xonsh/unwrapped.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/xo/xonsh/unwrapped.nix b/pkgs/by-name/xo/xonsh/unwrapped.nix index a47c0f437d7c..60307957c04d 100644 --- a/pkgs/by-name/xo/xonsh/unwrapped.nix +++ b/pkgs/by-name/xo/xonsh/unwrapped.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, @@ -63,7 +64,8 @@ buildPythonPackage rec { pytest-subprocess pytestCheckHook requests - + ] + ++ lib.optionals (!stdenv.isDarwin) [ # required by test_man_completion man util-linux @@ -101,6 +103,15 @@ buildPythonPackage rec { # flaky tests in test_vc.py "test_vc_get_branch" "test_dirty_working_directory" + ] + ++ lib.optionals stdenv.isDarwin [ + # fails on Darwin + "test_bash_and_is_alias_is_only_functional_alias" + "test_complete_command" + "test_man_completion" + "test_on_command_not_found_replacement" + "test_skipper_command" + "test_xonsh_lexer_no_win" ]; # https://github.com/NixOS/nixpkgs/issues/248978