Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/docs/.build/
/*.egg-info
*.pyc
*.pyo
_scratch/
Session.vim
/.tox/
13 changes: 12 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
language: python
python:
- "3.5"
- "3.4"
- "3.3"
- "2.7"
- "2.6"
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install: pip install -r requirements.txt
# command to run tests, e.g. python setup.py test
script: py.test
script: py.test

# run python -OO on certain versions only, 3.3 and 3.5 cannot handle this
matrix:
include:
- python: "2.6"
script: python -OO -m py.test tests/test_enum.py
- python: "2.7"
script: python -OO -m py.test tests/test_enum.py
- python: "3.4"
script: python -OO -m py.test tests/test_enum.py
2 changes: 2 additions & 0 deletions docx/enum/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ def _intro_text(self):
cls_docstring = self._clsdict['__doc__']
except KeyError:
cls_docstring = ''
if None == cls_docstring:
cls_docstring = ''
return textwrap.dedent(cls_docstring).strip()

def _member_def(self, member):
Expand Down
3 changes: 3 additions & 0 deletions tests/test_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ def it_knows_if_a_setting_is_valid(self):
def it_can_be_referred_to_by_a_convenience_alias_if_defined(self):
assert BARFOO is FOOBAR # noqa

def it_provides_doc(self):
assert(FOOBAR.__docs_rst__)


class DescribeEnumValue(object):

Expand Down