-
Notifications
You must be signed in to change notification settings - Fork 1
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
5 changed files
with
67 additions
and
28 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
s3workers | ||
========= | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
s3workers |
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,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: |
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,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 |
This file was deleted.
Oops, something went wrong.
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,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 |