Skip to content

Commit

Permalink
start docs and fix silly test
Browse files Browse the repository at this point in the history
  • Loading branch information
bradrf committed Dec 29, 2016
1 parent 30069a5 commit 0c4f8f4
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 28 deletions.
7 changes: 7 additions & 0 deletions docs/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
s3workers
=========

.. toctree::
:maxdepth: 4

s3workers
46 changes: 46 additions & 0 deletions docs/s3workers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
s3workers package
=================

Submodules
----------

s3workers.cli module
--------------------

.. automodule:: s3workers.cli
:members:
:undoc-members:
:show-inheritance:

s3workers.jobs module
---------------------

.. automodule:: s3workers.jobs
:members:
:undoc-members:
:show-inheritance:

s3workers.progress module
-------------------------

.. automodule:: s3workers.progress
:members:
:undoc-members:
:show-inheritance:

s3workers.worker module
-----------------------

.. automodule:: s3workers.worker
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: s3workers
:members:
:undoc-members:
:show-inheritance:
8 changes: 5 additions & 3 deletions s3workers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-

__author__ = """Brad Robel-Forrest"""
__author__ = 'Brad Robel-Forrest'
__email__ = 'brad@bitpony.com'
__version__ = '0.1.0'

from .worker import Worker
from .progress import S3KeyProgress
from .jobs import S3ListJob
1 change: 0 additions & 1 deletion s3workers/s3workers.py

This file was deleted.

33 changes: 9 additions & 24 deletions tests/test_s3workers.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,41 +1,26 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
'''
test_s3workers
----------------------------------
Tests for `s3workers` module.
"""
'''

import pytest

from contextlib import contextmanager
from click.testing import CliRunner

from s3workers import s3workers
from s3workers import cli
import s3workers
from s3workers.cli import main


@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():
runner = CliRunner()
result = runner.invoke(cli.main)
assert result.exit_code == 0
assert 's3workers.cli.main' in result.output
help_result = runner.invoke(cli.main, ['--help'])
result = runner.invoke(main)
assert result.exit_code == 2 # requires a command
assert 'S3_URI' in result.output
help_result = runner.invoke(main, ['--help'])
assert help_result.exit_code == 0
assert '--help Show this message and exit.' in help_result.output
assert 'Show this message and exit.' in help_result.output

0 comments on commit 0c4f8f4

Please sign in to comment.