1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-10-30 14:44:05 +00:00

Added Python Compile Rule

This commit is contained in:
Cami Diez
2015-06-21 09:24:27 +08:00
parent 2f1460120e
commit a0949b1102
2 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import pytest
from thefuck.rules.python_compile import match, get_new_command
from tests.utils import Command
@pytest.mark.parametrize('command', [
Command(script='python foo'),
Command(script='python bar')])
def test_match(command):
assert match(command, None)
@pytest.mark.parametrize('command, new_command', [
(Command('python foo'), 'python foo.py'),
(Command('python bar'), 'python bar.py')])
def test_get_new_command(command, new_command):
assert get_new_command(command, None) == new_command