Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import & test fixes. #20

Merged
merged 4 commits into from
Mar 4, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Import & test fixes.
- Try importing `sphinx.ext.napoleon` first (if you have a recent Sphinx
installed, there's no reason to have `sphinxcontrib.napoleon` installed
too).
- Try importing `unittest.mock` first in the test suite (same as above).
- Make tests runnable as `python test_defopt.py`.
- Ignore vim's `.*.swp` swap files.
anntzer committed Feb 28, 2017
commit ddbda7fcab1edfe30f750587f49e39d7f19b1b88
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -63,3 +63,6 @@ target/

# PyCharm files
.idea/

# Editor files
.*.swp
9 changes: 8 additions & 1 deletion test_defopt.py
Original file line number Diff line number Diff line change
@@ -6,7 +6,10 @@
import typing
import unittest

import mock
try:
from unittest import mock
except ImportError:
import mock

import defopt
from examples import booleans, choices, lists, parsers, short, starargs, styles
@@ -757,3 +760,7 @@ def _run_example(self, example, argv):
argv = [sys.executable, '-m', example.__name__] + argv
output = subprocess.check_output(argv, stderr=subprocess.STDOUT)
return output.replace(b'\r\n', b'\n')


if __name__ == "__main__":
unittest.main()