forked from FPGAwars/apio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
51 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,8 @@ | |
*.egg-info | ||
.coverage | ||
.tox/ | ||
.cache/ | ||
build/ | ||
dist/ | ||
cover/ | ||
htmlcov/ | ||
__pycache__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
language: python | ||
python: | ||
- "2.7" | ||
- "3.5" | ||
install: | ||
- pip install . | ||
- pip install -U tox | ||
- apio install --all | ||
script: nosetests | ||
script: | ||
- tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
import apio | ||
from click.testing import CliRunner | ||
|
||
|
||
def test_apio_build_board(): | ||
runner = CliRunner() | ||
result = runner.invoke(apio.build, ['--board', 'icezum']) | ||
def test_apio_build_board(clirunner): | ||
result = clirunner.invoke(apio.build, ['--board', 'icezum']) | ||
assert result.exit_code == 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
import apio | ||
from click.testing import CliRunner | ||
|
||
|
||
def test_apio_clean(): | ||
runner = CliRunner() | ||
result = runner.invoke(apio.clean) | ||
def test_apio_clean(clirunner): | ||
result = clirunner.invoke(apio.clean) | ||
assert result.exit_code == 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
import apio | ||
from click.testing import CliRunner | ||
|
||
|
||
def test_apio_sim(): | ||
runner = CliRunner() | ||
result = runner.invoke(apio.sim) | ||
def test_apio_sim(clirunner): | ||
result = clirunner.invoke(apio.sim) | ||
assert result.exit_code == 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
import apio | ||
from click.testing import CliRunner | ||
|
||
|
||
def test_apio_time_board(): | ||
runner = CliRunner() | ||
result = runner.invoke(apio.time, ['--board', 'icezum']) | ||
def test_apio_time_board(clirunner): | ||
result = clirunner.invoke(apio.time, ['--board', 'icezum']) | ||
assert result.exit_code == 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
import apio | ||
from click.testing import CliRunner | ||
|
||
|
||
def test_apio_upload_board(): | ||
runner = CliRunner() | ||
result = runner.invoke(apio.upload, ['--board', 'icezum']) | ||
def test_apio_upload_board(clirunner): | ||
result = clirunner.invoke(apio.upload, ['--board', 'icezum']) | ||
assert result.exit_code == 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
import apio | ||
from click.testing import CliRunner | ||
|
||
|
||
def test_apio_verify(): | ||
runner = CliRunner() | ||
result = runner.invoke(apio.verify) | ||
def test_apio_verify(clirunner): | ||
result = clirunner.invoke(apio.verify) | ||
assert result.exit_code == 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import pytest | ||
from click.testing import CliRunner | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def clirunner(): | ||
return CliRunner() | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def validate_cliresult(): | ||
def decorator(result): | ||
assert result.exit_code == 0 | ||
assert not result.exception | ||
assert "error" not in result.output.lower() | ||
return decorator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
import apio | ||
from click.testing import CliRunner | ||
|
||
|
||
def test_apio_boards_list(): | ||
runner = CliRunner() | ||
result = runner.invoke(apio.boards, ['--list']) | ||
def test_apio_boards_list(clirunner): | ||
result = clirunner.invoke(apio.boards, ['--list']) | ||
assert result.exit_code == 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
import apio | ||
from click.testing import CliRunner | ||
|
||
|
||
def test_apio_install_list(): | ||
runner = CliRunner() | ||
result = runner.invoke(apio.install, ['--list']) | ||
def test_apio_install_list(clirunner): | ||
result = clirunner.invoke(apio.install, ['--list']) | ||
assert result.exit_code == 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
import apio | ||
from click.testing import CliRunner | ||
|
||
|
||
def test_apio_system_lsusb(): | ||
runner = CliRunner() | ||
result = runner.invoke(apio.system, ['lsusb']) | ||
def test_apio_system_lsusb(clirunner): | ||
result = clirunner.invoke(apio.system, ['lsusb']) | ||
assert result.exit_code == 0 | ||
|
||
|
||
def test_apio_system_lsftdi(): | ||
runner = CliRunner() | ||
result = runner.invoke(apio.system, ['lsftdi']) | ||
def test_apio_system_lsftdi(clirunner): | ||
result = clirunner.invoke(apio.system, ['lsftdi']) | ||
assert result.exit_code == 0 | ||
|
||
|
||
def test_apio_system_platform(): | ||
runner = CliRunner() | ||
result = runner.invoke(apio.system, ['platform']) | ||
def test_apio_system_platform(clirunner): | ||
result = clirunner.invoke(apio.system, ['platform']) | ||
assert result.exit_code == 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
import apio | ||
from click.testing import CliRunner | ||
|
||
|
||
def test_apio_uninstall_list(): | ||
runner = CliRunner() | ||
result = runner.invoke(apio.uninstall, ['--list']) | ||
def test_apio_uninstall_list(clirunner): | ||
result = clirunner.invoke(apio.uninstall, ['--list']) | ||
assert result.exit_code == 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters