1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-20 09:39:01 +00:00
thefuck/tests/rules/test_rm_root.py

15 lines
333 B
Python
Raw Normal View History

import pytest
2019-11-01 02:41:07 +02:00
from thefuck.rules.rm_root import match
from thefuck.types import Command
2015-04-22 16:22:10 +02:00
def test_match():
2019-10-25 00:51:47 +03:00
assert match(Command('rm -rf /', ''))
@pytest.mark.parametrize('command', [
Command('ls', 'add --no-preserve-root'),
2019-10-25 00:51:47 +03:00
Command('rm', '/usr/bin/python')])
def test_not_match(command):
assert not match(command)