# Overriding \`doCheck\` doesn't work with python package

**URL:** https://discourse.nixos.org/t/overriding-docheck-doesnt-work-with-python-package/14674
**Category:** Uncategorized
**Created:** [August 23, 2021, 10:07pm UTC](https://discourse.nixos.org/t/overriding-docheck-doesnt-work-with-python-package/14674 "2021-08-23T22:07:35Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![samuela](https://discourse.nixos.org/user_avatar/discourse.nixos.org/samuela/32/2486_2.png) [@samuela](https://discourse.nixos.org/u/samuela)
#### Post date: [August 23, 2021, 10:07pm UTC](https://discourse.nixos.org/t/overriding-docheck-doesnt-work-with-python-package/14674/1 "2021-08-23T22:07:35Z")

</div>

I have a simple nix-shell file:

```auto
let
  # From https://github.com/NixOS/nixpkgs/pull/134894.
  pkgs = import (fetchTarball("https://github.com/NixOS/nixpkgs/archive/a16117f1c042d4772d750077fa3c21421cf4a199.tar.gz")) {};
in pkgs.mkShell {
  buildInputs = with pkgs; [
    (python3Packages.jax.overrideAttrs (_: { doCheck = false; }))
  ];
}

```

The tests take a little while to run, so I’d like to skip them for convenience. However `overrideAttrs` with `doCheck = false;` doesn’t seem to have any effect… It still runs the test suite.

How can I override the derivation to skip the test suite?

---

<div class="post-metadata">

### Author: ![jonringer](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jonringer/32/1348_2.png) [@jonringer](https://discourse.nixos.org/u/jonringer)
#### Post date: [August 23, 2021, 11:51pm UTC](https://discourse.nixos.org/t/overriding-docheck-doesnt-work-with-python-package/14674/2 "2021-08-23T23:51:40Z")

</div>

You’re looking for `overridePythonAttrs`, the checkPhase declared in a `buildPythonPackage` maps to a `installCheckPhase` in `mkDerivation`. The reason for this, is that packages with native extensions can only be installed, and are not represented in the build directory.

> <https://github.com/NixOS/nixpkgs/blob/53fdb18b411af1c3370c89b5f03615b9ef89dbbd/doc/languages-frameworks/python.section.md#overriding-python-packages-overriding-python-packages>

---

<div class="post-metadata">

### Author: ![samuela](https://discourse.nixos.org/user_avatar/discourse.nixos.org/samuela/32/2486_2.png) [@samuela](https://discourse.nixos.org/u/samuela)
#### Post date: [August 24, 2021, 1:32am UTC](https://discourse.nixos.org/t/overriding-docheck-doesnt-work-with-python-package/14674/3 "2021-08-24T01:32:10Z")

</div>

Ah gotcha, thank you! I had no idea about `overridePythonAttrs`!
