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

python3.pkgs.httpie: add pip as a test dependency #250256

Merged
merged 1 commit into from
Aug 20, 2023
Merged

python3.pkgs.httpie: add pip as a test dependency #250256

merged 1 commit into from
Aug 20, 2023

Conversation

tjni
Copy link
Contributor

@tjni tjni commented Aug 19, 2023

Description of changes

This is needed once we remove pip from the ambient environment (which will happen when switching to build to build Python packages), or else we get mysterious test errors like:

_______________________ test_plugins_installation[True] ________________________

httpie_plugins_success = <function httpie_plugins_success.<locals>.runner at 0x7ffff1df8550>
interface = Interface(path=PosixPath('/build/pytest-of-nixbld/pytest-0/test_plugins_installation_True0/interface'), environment=<M...out': <tempfile._TemporaryFileWrapper object at 0x7ffff1deee90>,
 'stdout_encoding': 'utf-8',
 'stdout_isatty': True}>)
dummy_plugin = Plugin(interface=Interface(path=PosixPath('/build/pytest-of-nixbld/pytest-0/test_plugins_installation_True0/interface'...ue}>), name='httpie-270ea5c7', version='1.0.0', entry_points=[EntryPoint(name='test', group='httpie.plugins.auth.v1')])
cli_mode = True

    @pytest.mark.requires_installation
    @pytest.mark.parametrize('cli_mode', [True, False])
    def test_plugins_installation(httpie_plugins_success, interface, dummy_plugin, cli_mode):
>       lines = httpie_plugins_success('install', dummy_plugin.path, cli_mode=cli_mode)

tests/test_plugins_cli.py:10: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cli_mode = True
args = ('install', PosixPath('/build/pytest-of-nixbld/pytest-0/test_plugins_installation_True0/interface/httpie-270ea5c7'))
response = 'Installing /build/pytest-of-nixbld/pytest-0/test_plugins_installation_True0/interface/httpie-270ea5c7...\n'

    def runner(*args, cli_mode: bool = True):
        response = httpie_plugins(*args, cli_mode=True)
>       assert response.exit_status == ExitStatus.SUCCESS
E       AssertionError

tests/utils/plugins_cli.py:233: AssertionError

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/)
  • 23.11 Release Notes (or backporting 23.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
  • Fits CONTRIBUTING.md.

@tjni
Copy link
Contributor Author

tjni commented Aug 19, 2023

@ofborg build python310Packages.httpie python311Packages.httpie

@fabaff
Copy link
Member

fabaff commented Aug 20, 2023

Result of nixpkgs-review pr 250256 run on x86_64-linux 1

10 packages built:
  • http-prompt
  • http-prompt.dist
  • httpie (python310Packages.httpie)
  • httpie.dist (python310Packages.httpie.dist)
  • python310Packages.httpie-ntlm
  • python310Packages.httpie-ntlm.dist
  • python311Packages.httpie
  • python311Packages.httpie-ntlm
  • python311Packages.httpie-ntlm.dist
  • python311Packages.httpie.dist

Copy link
Member

@fabaff fabaff left a comment

Choose a reason for hiding this comment

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

Change looks good to me.

@fabaff fabaff merged commit 9923374 into NixOS:master Aug 20, 2023
@tjni tjni deleted the httpie branch August 20, 2023 16:20
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.

2 participants