This repository has been archived on 2015-04-29. You can view files and clone it, but cannot push or open issues or pull requests.
psh/test/test_example_cmd.py
2015-02-26 18:08:01 -05:00

20 lines
462 B
Python

import pytest
from psh import echo, example
from utils import TestFormatter
@pytest.fixture
def test_formatter():
return TestFormatter()
def test_example_cmd_should_return_two_things(test_formatter):
example.chain(test_formatter).call()
assert "examplecommand" == test_formatter.get_data()
def test_echo_should_echo(test_formatter):
example.chain(echo).chain(test_formatter).call()
assert "examplecommand" == test_formatter.get_data()