Still cleaning up.
This commit is contained in:
@ -1,3 +0,0 @@
|
|||||||
ON_START = 'bonobo.on_start'
|
|
||||||
ON_TICK = 'bonobo.on_tick'
|
|
||||||
ON_STOP = 'bonobo.on_stop'
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
def require(package, requirement=None):
|
|
||||||
requirement = requirement or package
|
|
||||||
|
|
||||||
try:
|
|
||||||
return __import__(package)
|
|
||||||
except ImportError:
|
|
||||||
from colorama import Fore, Style
|
|
||||||
print(
|
|
||||||
Fore.YELLOW,
|
|
||||||
'This example requires the {!r} package. Install it using:'.
|
|
||||||
format(requirement),
|
|
||||||
Style.RESET_ALL,
|
|
||||||
sep=''
|
|
||||||
)
|
|
||||||
print()
|
|
||||||
print(
|
|
||||||
Fore.YELLOW,
|
|
||||||
' $ pip install {!s}'.format(requirement),
|
|
||||||
Style.RESET_ALL,
|
|
||||||
sep=''
|
|
||||||
)
|
|
||||||
print()
|
|
||||||
raise
|
|
||||||
|
|||||||
@ -119,6 +119,16 @@ def test_version(runner):
|
|||||||
assert out.startswith('bonobo ')
|
assert out.startswith('bonobo ')
|
||||||
assert __version__ in out
|
assert __version__ in out
|
||||||
|
|
||||||
|
out, err = runner('version', '-q')
|
||||||
|
out = out.strip()
|
||||||
|
assert out.startswith('bonobo ')
|
||||||
|
assert __version__ in out
|
||||||
|
|
||||||
|
out, err = runner('version', '-qq')
|
||||||
|
out = out.strip()
|
||||||
|
assert not out.startswith('bonobo ')
|
||||||
|
assert __version__ in out
|
||||||
|
|
||||||
|
|
||||||
@all_runners
|
@all_runners
|
||||||
def test_download_works_for_examples(runner):
|
def test_download_works_for_examples(runner):
|
||||||
|
|||||||
Reference in New Issue
Block a user