diff options
author | Jeremy Fleischman <jeremyfleischman@gmail.com> | 2023-02-06 09:44:18 -0800 |
---|---|---|
committer | Jeremy Fleischman <jeremyfleischman@gmail.com> | 2023-02-06 12:59:22 -0800 |
commit | fd6c52733b95ee8aff5cc6f18e1c8df17a5ea809 (patch) | |
tree | 5ce0fe24df367b93dd76b4323d39d6d9c452c3d1 /pkgs/tools/admin | |
parent | 50981b1486c6fea1892f4e1f4e92e9c85f9ede93 (diff) |
mycli: skip broken test
While I was in here, I ported this code to use `pytestCheckHook`. This fixes https://github.com/NixOS/nixpkgs/issues/211415 (maybe this is more of a workaround?). This build was failing due to a broken test upstream. I've instructed nix to skip that test for now. I also changed the `py.test` to plain `pytest`. I'm not familiar with the difference, but according to [this SO answer](https://stackoverflow.com/a/41893170/1739415), it sounds like `pytest` is the new hotness and should be used wherever possible.
Diffstat (limited to 'pkgs/tools/admin')
-rw-r--r-- | pkgs/tools/admin/mycli/default.nix | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/pkgs/tools/admin/mycli/default.nix b/pkgs/tools/admin/mycli/default.nix index bf1ad3cfe47b5..c1753fe1a563c 100644 --- a/pkgs/tools/admin/mycli/default.nix +++ b/pkgs/tools/admin/mycli/default.nix @@ -30,16 +30,24 @@ buildPythonApplication rec { sqlparse ]; - nativeCheckInputs = [ pytest glibcLocales ]; + nativeCheckInputs = [ pytestCheckHook glibcLocales ]; - checkPhase = '' + preCheck = '' export HOME=. export LC_ALL="en_US.UTF-8" - - py.test \ - --ignore=mycli/packages/paramiko_stub/__init__.py ''; + disabledTestPaths = [ + "mycli/packages/paramiko_stub/__init__.py" + ]; + + disabledTests = [ + # Note: test_auto_escaped_col_names is currently failing due to a bug upstream. + # TODO: re-enable this test once there is a fix upstream. See + # https://github.com/dbcli/mycli/issues/1103 for details. + "test_auto_escaped_col_names" + ]; + postPatch = '' substituteInPlace setup.py \ --replace "cryptography == 36.0.2" "cryptography" |