diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..48a97e31 --- /dev/null +++ b/.gitignore @@ -0,0 +1,109 @@ +# Created by .ignore support plugin (hsz.mobi) +### IPythonNotebook template +# Temporary data +.ipynb_checkpoints/ +### Python template +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# IPython Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# dotenv +.env + +# virtualenv +venv/ +ENV/ + +# Spyder project settings +.spyderproject + +# Rope project settings +.ropeproject +### VirtualEnv template +# Virtualenv +# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ +.Python +[Bb]in +[Ii]nclude +[Ll]ib +[Ll]ib64 +[Ll]ocal +[Ss]cripts +pyvenv.cfg +.venv +pip-selfcheck.json + +.idea/ \ No newline at end of file diff --git a/README.md b/README.md index 8f53debd..bf8a89af 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,8 @@ When you call `Fire`, it fires off (executes) your command. | [Verbose](doc/using-cli.md#verbose-flag) | `command -- --verbose` | _Note that flags are separated from the Fire command by an isolated `--` arg._ +## Tests +Run all tests `python -m unittest discover -s tests -p "*_test.py"` ## Disclaimer diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..a735a02a --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +ipython \ No newline at end of file diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 00000000..39b2f8bb --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1,23 @@ +# Copyright (C) 2017 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Python Fire module for third_party.""" + +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function + +from fire.core import Fire + +__all__ = ['Fire'] diff --git a/fire/completion_test.py b/tests/completion_test.py similarity index 100% rename from fire/completion_test.py rename to tests/completion_test.py diff --git a/fire/core_test.py b/tests/core_test.py similarity index 100% rename from fire/core_test.py rename to tests/core_test.py diff --git a/fire/decorators_test.py b/tests/decorators_test.py similarity index 100% rename from fire/decorators_test.py rename to tests/decorators_test.py diff --git a/fire/fire_import_test.py b/tests/fire_import_test.py similarity index 100% rename from fire/fire_import_test.py rename to tests/fire_import_test.py diff --git a/fire/helputils_test.py b/tests/helputils_test.py similarity index 100% rename from fire/helputils_test.py rename to tests/helputils_test.py diff --git a/fire/inspectutils_test.py b/tests/inspectutils_test.py similarity index 100% rename from fire/inspectutils_test.py rename to tests/inspectutils_test.py diff --git a/fire/parser_fuzz_test.py b/tests/parser_fuzz_test.py similarity index 100% rename from fire/parser_fuzz_test.py rename to tests/parser_fuzz_test.py diff --git a/fire/test_components_test.py b/tests/test_components_test.py similarity index 100% rename from fire/test_components_test.py rename to tests/test_components_test.py