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

Python on Nix tests #85793

Merged
merged 2 commits into from Apr 25, 2020
Merged

Python on Nix tests #85793

merged 2 commits into from Apr 25, 2020

Conversation

FRidh
Copy link
Member

@FRidh FRidh commented Apr 22, 2020

Motivation for this change
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.

This test was disabled because it did not function yet, however,
apparently it does with 3.8.
because the package that is used as part of the test does not support
older versions.
@jonringer
Copy link
Contributor

what does venv get us when we already have PYTHONPATH to specific packages?

@FRidh
Copy link
Member Author

FRidh commented Apr 22, 2020

I don't understand what you mean. These tests are to ensure venv still functions.

@jonringer
Copy link
Contributor

oh, for some reason I thought we were using venv to test packages, not a test to validate venv's functionality

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

[nix-shell:/home/jon/.cache/nixpkgs-review/pr-85793]$ nix-build ./nixpkgs/ -A python38.tests.nixenv-venv
these derivations will be built:
  /nix/store/zqcgfwj2x21yc3yn5x2cplhd7n746i2h-python3-3.8.2-env.drv
  /nix/store/msicpycvg075am99zl2yksqp1ykk7d15-python3-3.8.2-venv.drv
  /nix/store/2z9bp5hnscznywiplca9bknwpijgpql7-python3-3.8.2-tests-nixenv-venv.drv
building '/nix/store/zqcgfwj2x21yc3yn5x2cplhd7n746i2h-python3-3.8.2-env.drv'...
created 4 symlinks in user environment
building '/nix/store/msicpycvg075am99zl2yksqp1ykk7d15-python3-3.8.2-venv.drv'...
building '/nix/store/2z9bp5hnscznywiplca9bknwpijgpql7-python3-3.8.2-tests-nixenv-venv.drv'...
test_base_prefix (test_python.TestCasePython) ... ok
test_interpreter (test_python.TestCasePython) ... ok
test_prefix (test_python.TestCasePython) ... ok
test_python_version (test_python.TestCasePython) ... ok
test_site_prefix (test_python.TestCasePython) ... ok

----------------------------------------------------------------------
Ran 5 tests in 0.000s

OK
/nix/store/vgk3dzw6smq6w722d5iaapmirwdchy1f-python3-3.8.2-tests-nixenv-venv

@FRidh FRidh merged commit 6f873e9 into NixOS:master Apr 25, 2020
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