Skip to content

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

Merged
fabaff merged 1 commit intoNixOS:masterfrom
tjni:httpie
Aug 20, 2023
Merged

python3.pkgs.httpie: add pip as a test dependency#250256
fabaff merged 1 commit intoNixOS:masterfrom
tjni:httpie

Conversation

@tjni
Copy link
Copy Markdown
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.

@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Aug 19, 2023
@tjni
Copy link
Copy Markdown
Contributor Author

tjni commented Aug 19, 2023

@ofborg build python310Packages.httpie python311Packages.httpie

@ofborg ofborg bot requested review from relrod and schneefux August 19, 2023 22:26
@ofborg ofborg bot added 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 Aug 19, 2023
@fabaff
Copy link
Copy Markdown
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
Copy Markdown
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

Labels

6.topic: python Python is a high-level, general-purpose programming language. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants