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

Create a decorator for checking if a particular executable (e.g. dnf, apt) is available #1147

Open
dralley opened this issue Oct 25, 2018 · 1 comment

Comments

@dralley
Copy link
Contributor

dralley commented Oct 25, 2018

Perhaps we should make one specific for package managers and one that's more general for any executable (e.g. lsof). but that's up for debate.

My general suggestion is to turn these couple of lines into a decorator provided by pulp-smash to avoid copy-pasting and facilitate other plugins (like debian) doing something similar.

https://github.com/pulp/pulp_rpm/blob/master/pulp_rpm/tests/functional/api/test_consume_content.py#L38

@rochacbruno
Copy link
Member

+1 I like the idea of transforming all the skip functions into decorators.

we can add the decorator functionality while keeping the backwards compatibility with the old style and allow the function to be used in specific cases where a decorator is not a fit.

I have implemented stuff like this in robozilla[1]

[1] https://github.com/SatelliteQE/robozilla/blob/master/robozilla/decorators/__init__.py#L465

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

No branches or pull requests

3 participants