Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.stestr: init at 2.6.0 #78879

Closed
wants to merge 1 commit into from

Conversation

drewrisinger
Copy link
Contributor

Motivation for this change

Add test dependency for qiskit #78772 @jonringer
Depends on #78876 and #78877

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Python Parallel test runner.

Used in qiskit tests.
];
pythonCheckImports = [ "stestr" ];
checkPhase = ''
export PATH=$out/bin:$PATH # add stestr to path
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export PATH=$out/bin:$PATH # add stestr to path
runHook preCheck
export PATH=${placeholder "out"}/bin:$PATH # add stestr to path

export HOME=$(mktemp -d) # some tests require home for tempfiles
stestr init # for test_load.py
pytest \
--ignore-glob='**/test_sql.py' # requires subunit2sql
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--ignore-glob='**/test_sql.py' # requires subunit2sql
--ignore-glob='**/test_sql.py' # requires subunit2sql
runHook postCheck

voluptuous
];

# remove test requirements that aren't in Nix.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# remove test requirements that aren't in Nix.
# remove test requirements that aren't in Nix, see checkPhase.

@@ -5929,6 +5929,10 @@ in {

python_statsd = callPackage ../development/python-modules/python_statsd { };

stestr = callPackage ../development/python-modules/stestr {
pythonSubunit = self.subunit;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you just import at the derivation's header subunit?

@@ -0,0 +1,73 @@
{ lib
, pythonOlder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used in any input or what so ever.

Suggested change
, pythonOlder

@drewrisinger
Copy link
Contributor Author

@doronbehar I'm OK with letting this PR lapse, but thanks for your review. I'd originally thought several packages needed stestr (see linked PRs), but I found they can be tested with pytest, which is simpler/better-supported. Maybe slightly slower tests b/c not parallelized, but acceptable. And if I really need parallel tests, I can do that with pytest-xdist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants