-
Notifications
You must be signed in to change notification settings - Fork 9
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
9 changed files
with
126 additions
and
36 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
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
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
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
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
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
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,18 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Console script for pynrc.""" | ||
import sys | ||
import click | ||
|
||
|
||
@click.command() | ||
def main(args=None): | ||
"""Console script for pynrc.""" | ||
click.echo("Replace this message by putting your code into " | ||
"pynrc.cli.main") | ||
click.echo("See click documentation at http://click.pocoo.org/") | ||
return 0 | ||
|
||
|
||
if __name__ == "__main__": | ||
sys.exit(main()) # pragma: no cover |
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 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Tests for `pynrc` package.""" | ||
|
||
import pytest | ||
#import pynrc | ||
|
||
|
||
def test_the_obvious(): | ||
print('pyNRC testing not yet implemented!!') | ||
assert True == True | ||
|
||
|
||
if __name__ == '__main__': | ||
pytest.main() |
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,38 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Tests for `pynrc` package.""" | ||
|
||
import pytest | ||
|
||
from click.testing import CliRunner | ||
|
||
import pynrc | ||
from pynrc import cli | ||
|
||
|
||
@pytest.fixture | ||
def response(): | ||
"""Sample pytest fixture. | ||
See more at: http://doc.pytest.org/en/latest/fixture.html | ||
""" | ||
# import requests | ||
# return requests.get('https://github.com/audreyr/cookiecutter-pypackage') | ||
|
||
|
||
def test_content(response): | ||
"""Sample pytest test function with the pytest fixture as an argument.""" | ||
# from bs4 import BeautifulSoup | ||
# assert 'GitHub' in BeautifulSoup(response.content).title.string | ||
|
||
|
||
def test_command_line_interface(): | ||
"""Test the CLI.""" | ||
runner = CliRunner() | ||
result = runner.invoke(cli.main) | ||
assert result.exit_code == 0 | ||
assert 'pynrc.cli.main' in result.output | ||
help_result = runner.invoke(cli.main, ['--help']) | ||
assert help_result.exit_code == 0 | ||
assert '--help Show this message and exit.' in help_result.output |