nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

pythonPackages.unittestCheckHook: init

Open winterqt opened this issue 1 year ago • 5 comments

Description of changes

This adds a new hook, unittestCheckHook, that runs python -m unittest discover, as well as migrating the majority of packages that use unittest to it.

Things done
  • Built on platform(s)
    • [ ] x86_64-linux
    • [ ] aarch64-linux
    • [ ] x86_64-darwin
    • [ ] aarch64-darwin
  • [ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • [ ] Tested, as applicable:
  • [ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • [ ] Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • [ ] (Package updates) Added a release notes entry if the change is major or breaking
    • [ ] (Module updates) Added a release notes entry if the change is significant
    • [ ] (Module addition) Added a release notes entry if adding a new NixOS module
    • [ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • [x] Fits CONTRIBUTING.md.

winterqt avatar Aug 06 '22 16:08 winterqt

Wonder why ofborg-eval-package-list never failed with the previous commits (when it should have).

Edit, hours later: but it did for the same type of problem just now...?

winterqt avatar Aug 06 '22 17:08 winterqt

I don't like that OfBorg added the clean up label, though I don't think it gives specifics as to why. 😕

As far as I know, I fixed every issue that caused packages to not eval, so I'm not sure what else it would be adding that for (even if it should fail for that)...

winterqt avatar Aug 06 '22 18:08 winterqt

I don't like that OfBorg added the clean up label, though I don't think it gives specifics as to why. confused

don't worry about it. I am not sure what triggered it but maybe the treewide change.

SuperSandro2000 avatar Aug 07 '22 09:08 SuperSandro2000

As it is now, the unittest hook should be added to checkInputs, but after https://github.com/NixOS/nixpkgs/pull/185406 it needs to go to nativeCheckInputs.

FRidh avatar Aug 07 '22 09:08 FRidh

As it is now, the unittest hook should be added to checkInputs

Fixed.

winterqt avatar Aug 07 '22 19:08 winterqt

This broke tests in .bitstring: https://hydra.nixos.org/build/187598212 (the "treewide" commit, according to my bisect)

vcunat avatar Aug 19 '22 19:08 vcunat

Yes, someone already noted that -- there's a quick fix but also a more proper one that should be upstreamed. See https://matrix.to/#/!kjdutkOsheZdjqYmqp%3Anixos.org/%24_WKyurbQoNXb49piMvNidpULeGz7zFJh-LFM4HoAttE

winterqt avatar Aug 19 '22 19:08 winterqt

In PR #187531

vcunat avatar Aug 20 '22 06:08 vcunat

Other regressions probably won't have significant impact, but let me post them here anyway, in case someone's interested:

  • [ ] .plac https://hydra.nixos.org/build/187634946

vcunat avatar Aug 21 '22 08:08 vcunat

I made #187778 to fix regressions (drafted until latest eval completes).

winterqt avatar Aug 21 '22 18:08 winterqt