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

Docs/fixes #102

Merged
merged 3 commits into from
Nov 11, 2018
Merged
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
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Changelog
=========

* :support: `101` Added note about how to execute logging configured tests
* :support: `99` Fixed ``assertCategoricalLevel(Not)In`` docstring parameters
* :release:`0.10.0 <2018-09-23>`
* :feature:`92` Improve indentation of multiline locals
* :support:`90` Added support for python 3.7
Expand Down
8 changes: 8 additions & 0 deletions marbles/core/marbles/core/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ class AssertionLogger(object):
log.logger.configure(logfile='/path/to/marbles.log',
attrs=['filename', 'date'])
marbles.core.main()

.. note::
If you configure logging within an ``if __name__ == '__main__'``,
block (as opposed to via environment variables), you must run
your tests with ``python /path/to/tests.py``. If you run your
tests with ``python -m marbles``, the
``if __name__ == '__main__'`` block won't get executed and the
logger won't get configured.
'''

def __init__(self):
Expand Down
12 changes: 6 additions & 6 deletions marbles/mixins/marbles/mixins/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -1196,16 +1196,16 @@ def assertCategoricalLevelIn(self, level, levels, msg=None):

Parameters
----------
levels1
levels2 : iterable
level
levels : iterable
msg : str
If not provided, the :mod:`marbles.mixins` or
:mod:`unittest` standard message will be used.

Raises
------
TypeError
If ``levels2`` is not iterable.
If ``levels`` is not iterable.
'''
if not isinstance(levels, collections.Iterable):
raise TypeError('Second argument is not iterable')
Expand All @@ -1219,16 +1219,16 @@ def assertCategoricalLevelNotIn(self, level, levels, msg=None):

Parameters
----------
levels1
levels2 : iterable
level
levels : iterable
msg : str
If not provided, the :mod:`marbles.mixins` or
:mod:`unittest` standard message will be used.

Raises
------
TypeError
If ``levels2`` is not iterable.
If ``levels`` is not iterable.
'''
if not isinstance(levels, collections.Iterable):
raise TypeError('Second argument is not iterable')
Expand Down