From 23404d06ddd06a545fa62df68c8782109337c242 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Wed, 1 Nov 2017 19:02:48 +0100 Subject: [PATCH] Still cleaning up. --- bonobo/events.py | 3 --- bonobo/examples/__init__.py | 23 ----------------------- tests/test_commands.py | 10 ++++++++++ 3 files changed, 10 insertions(+), 26 deletions(-) delete mode 100644 bonobo/events.py diff --git a/bonobo/events.py b/bonobo/events.py deleted file mode 100644 index 9a0cbba..0000000 --- a/bonobo/events.py +++ /dev/null @@ -1,3 +0,0 @@ -ON_START = 'bonobo.on_start' -ON_TICK = 'bonobo.on_tick' -ON_STOP = 'bonobo.on_stop' diff --git a/bonobo/examples/__init__.py b/bonobo/examples/__init__.py index 49b1544..e69de29 100644 --- a/bonobo/examples/__init__.py +++ b/bonobo/examples/__init__.py @@ -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 diff --git a/tests/test_commands.py b/tests/test_commands.py index 4bfc8ba..8a2c9b8 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -119,6 +119,16 @@ def test_version(runner): assert out.startswith('bonobo ') 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 def test_download_works_for_examples(runner):