Skip to content

pythonPackages.stestr: init at 2.6.0#78879

Closed
drewrisinger wants to merge 1 commit intoNixOS:masterfrom
drewrisinger:dr-pr-python-stestr
Closed

pythonPackages.stestr: init at 2.6.0#78879
drewrisinger wants to merge 1 commit intoNixOS:masterfrom
drewrisinger:dr-pr-python-stestr

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.

@ofborg ofborg bot added 6.topic: python Python is a high-level, general-purpose programming language. 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jan 30, 2020
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.

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

Labels

6.topic: python Python is a high-level, general-purpose programming language. 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants