Add a test.py rule
This commit is contained in:
parent
3203d57b36
commit
369ea7ff46
|
|
@ -189,6 +189,7 @@ using the matched rule and runs it. Rules enabled by default are as follows:
|
|||
* `sudo` – prepends `sudo` to previous command if it failed because of permissions;
|
||||
* `switch_layout` – switches command from your local layout to en;
|
||||
* `systemctl` – correctly orders parameters of confusing systemctl;
|
||||
* `test.py` &ndasg; runs `py.test` instead of `test.py`;
|
||||
* `whois` – fixes `whois` command.
|
||||
|
||||
Enabled by default only on specific platforms:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
def match(command, settings):
|
||||
return command.script == 'test.py' and 'not found' in command.stderr
|
||||
|
||||
|
||||
def get_new_command(command, settings):
|
||||
return 'py.test'
|
||||
|
||||
|
||||
# make it come before the python_command rule
|
||||
priority = 900
|
||||
Loading…
Reference in New Issue