Skip to content

Commit

Permalink
1.3.0 fix the things (#22)
Browse files Browse the repository at this point in the history
* fix the things

* fix one of hte multiprocessing bugs
  • Loading branch information
JBKahn authored Feb 11, 2018
1 parent 695b6fb commit 8a280ce
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
## Change Log

List of Rednose releases and changes, with the latest at the top:
* v1.3.0
* Add `NOSE_REDNOSE_HIDE_SKIPS` environment variable.
* Fix `NOSE_REDNOSE` environment variable.
* Added LICENCE file
* Allow using rednose with multiprocess.

* v1.2.3
* Fix bug when switching between python 2 and 3 using node ids.
* Added stream flush after every write to make sure dots are printed right after a test is executed.
Expand Down
21 changes: 21 additions & 0 deletions LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Joseph Kahn

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include *.rst
include LICENCE
11 changes: 9 additions & 2 deletions rednose.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,22 @@ def to_unicode(s):


class RedNose(nose.plugins.Plugin):
# In order to color multiprocess output it has to have a higher score.
score = 1001
env_opt = 'NOSE_REDNOSE'
env_opt_color = 'NOSE_REDNOSE_COLOR'
env_opt_hide_skips = 'NOSE_REDNOSE_HIDE_SKIPS'

def __init__(self, *args):
super(RedNose, self).__init__(*args)
self.enabled = False

def options(self, parser, env=os.environ):
rednose_on = bool(env.get(self.env_opt, False))
rednose_on_env_value = env.get(self.env_opt, False)
rednose_hide_skips_env_value = env.get(self.env_opt_hide_skips, False)

rednose_on = bool(rednose_on_env_value) if rednose_on_env_value not in ['false', '0'] else False
rednose_hide_skips = bool(rednose_hide_skips_env_value) if rednose_hide_skips_env_value not in ['false', '0'] else False
rednose_color = env.get(self.env_opt_color, 'auto')

parser.add_option(
Expand Down Expand Up @@ -110,7 +117,7 @@ def options(self, parser, env=os.environ):
parser.add_option(
"--hide-skips",
action="store_true",
default=False,
default=rednose_hide_skips,
help="Hide the error printing for skip cases (default is to show them)"
)

Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def read(fname):
name='rednose',
py_modules=['rednose'],
url='https://github.com/JBKahn/rednose',
version='1.2.3',
version='1.3.0',
classifiers=[
"License :: OSI Approved :: BSD License",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta",
Expand All @@ -29,6 +29,6 @@ def read(fname):
"Topic :: Software Development :: Testing",
],
keywords='test nosetests nose nosetest output colour console',
license='BSD',
license='MIT',
test_suite='test_files.new_tests',
)

0 comments on commit 8a280ce

Please sign in to comment.