Hello community, here is the log from the commit of package python-stestr for openSUSE:Factory checked in at 2018-11-14 14:40:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-stestr (Old) and /work/SRC/openSUSE:Factory/.python-stestr.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-stestr" Wed Nov 14 14:40:47 2018 rev:6 rq:646749 version:2.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-stestr/python-stestr.changes 2018-08-24 17:13:58.426775806 +0200 +++ /work/SRC/openSUSE:Factory/.python-stestr.new/python-stestr.changes 2018-11-14 14:41:04.942846553 +0100 @@ -1,0 +2,12 @@ +Tue Nov 6 19:49:46 UTC 2018 - Todd R <[email protected]> + +- Update to version 2.1.1 + * Add support for python 3.7 + * Fix handling of unexpected success results + * Allow stestr to be called as a module (#185) + * Add error handling for invalid input regexes + * Cleanup the manpage section on dealing with failed tests + * Cleanup argument help text on load command + * Fix description for the stestr run command + +------------------------------------------------------------------- Old: ---- stestr-2.1.0.tar.gz New: ---- stestr-2.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-stestr.spec ++++++ --- /var/tmp/diff_new_pack.x7c2uU/_old 2018-11-14 14:41:06.034845261 +0100 +++ /var/tmp/diff_new_pack.x7c2uU/_new 2018-11-14 14:41:06.038845256 +0100 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-stestr -Version: 2.1.0 +Version: 2.1.1 Release: 0 Summary: A test runner runner similar to testrepository License: Apache-2.0 ++++++ stestr-2.1.0.tar.gz -> stestr-2.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/.appveyor.yml new/stestr-2.1.1/.appveyor.yml --- old/stestr-2.1.0/.appveyor.yml 2018-06-02 00:54:34.000000000 +0200 +++ new/stestr-2.1.1/.appveyor.yml 2018-08-09 14:40:52.000000000 +0200 @@ -10,6 +10,10 @@ PYTHON_VERSION: "2.7.10" PYTHON_ARCH: "64" TOX_ENV: "py27" + - PYTHON: "C:\\Python37-x64" + PYTHON_VERSION: "3.7.0" + PYTHON_ARCH: "64" + TOX_ENV: "py37" - PYTHON: "C:\\Python36-x64" PYTHON_VERSION: "3.6.1" PYTHON_ARCH: "64" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/.travis.yml new/stestr-2.1.1/.travis.yml --- old/stestr-2.1.0/.travis.yml 2017-12-08 22:00:26.000000000 +0100 +++ new/stestr-2.1.1/.travis.yml 2018-08-09 14:40:52.000000000 +0200 @@ -6,6 +6,11 @@ env: TOXENV=py35 - python: "3.6" env: TOXENV=py36 + - os: linux + dist: xenial + python: 3.7 + env: TOXENV=py37 + sudo: true - python: "3.6" env: TOXENV=cover - python: "3.6" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/AUTHORS new/stestr-2.1.1/AUTHORS --- old/stestr-2.1.0/AUTHORS 2018-06-05 21:16:21.000000000 +0200 +++ new/stestr-2.1.1/AUTHORS 2018-08-09 14:50:01.000000000 +0200 @@ -23,6 +23,7 @@ Monty Taylor <[email protected]> Robert Collins <[email protected]> Sean McGinnis <[email protected]> +Sorin Sbarnea <[email protected]> Steve Heyman <[email protected]> Thomas Bechtold <[email protected]> Zane Bitter <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/ChangeLog new/stestr-2.1.1/ChangeLog --- old/stestr-2.1.0/ChangeLog 2018-06-05 21:16:21.000000000 +0200 +++ new/stestr-2.1.1/ChangeLog 2018-08-09 14:50:00.000000000 +0200 @@ -1,6 +1,17 @@ CHANGES ======= +2.1.1 +----- + +* Add support for python 3.7 +* Fix handling of unexpected success results +* Allow stestr to be called as a module (#185) +* Add error handling for invalid input regexes +* Cleanup the manpage section on dealing with failed tests +* Cleanup argument help text on load command +* Fix description for the stestr run command + 2.1.0 ----- @@ -284,10 +295,6 @@ * Pivot repo to stestr * Release 0.0.20 * Tests will be reliably tagged with worker-%d - -0.0.19 ------- - * Release 0.0.19 * Fix 0 timestamps for enumerated but not run tests * Update docs for the move to github @@ -301,22 +308,10 @@ * Improve error rendering of listing issues * \* When list-tests encounters an error, a much clearer response will now be shown. (Robert Collins, #1271133) * \* \`\`run\`\` was outputting bad MIME types - test/plain, not text/plain. (Robert Collins) - -0.0.18 ------- - * Release 0.0.18 * \* \`\`run\`\` now accepts \`\`--isolated\`\` as a parameter, which will cause each selected test to be run independently. This can be useful to both workaround isolation bugs and detect tests that can not be run independently. (Robert Collins) * \* \`\`capture\_ids\`\` in test\_run now returns a list of captures, permitting tests that need to test multiple runs to do so. (Robert Collins) - -0.0.17 ------- - * 0.0.17 ++++++ - -0.0.16 ------- - * Release 0.0.16 * \* When test listing fails, testr will now report an error rather than incorrectly trying to run zero tests. A test listing failure is detected by the returncode of the test listing process. (Robert Collins, #1185231) * \* A new testr.conf option \`\`group\_regex\`\` can be used for grouping tests so that they get run in the same backend runner. (Matthew Treinish) @@ -342,10 +337,6 @@ * Drop the ExtendedToStream wrapping around UI.make\_result * Move tag based test filtering into the UI: many test things won't be filtered, such as slow tests and pdb debugging, so the UI has to see the tests. Moving the responsibility into the UI may lead to repetition in other UI's if not made easy to reuse, but that seems like the lesser of evils for now * Simplify commands.failing - -0.0.15 ------- - * Release 0.0.15, with minimal subunit v2 support * Fix subunit v1 parallel test execution * Add test for --subunit support - the UI was previously only loosely tested @@ -360,41 +351,21 @@ * Use ConcurrentStreamResult always * Start getting streamresult into the innards * \* Expects subunit v2 if the local library has v2 support in the subunit library. This should be seamless if the system under test shares the Python libraries. If it doesn't, either arrange to use \`\`subunit-2to1\`\` or upgrade the subunit libraries for the system under test. (Robert Collins) - -0.0.14 ------- - * Update releasing docs and really release 0.0.14 * 0.0.14 ++++++ - -0.0.13 ------- - * Release 0.0.13 * \* \`\`setup.py testr\`\` was not indicating test failures via it's return code. (Monty Taylor) * Actually return from \_run\_testr - -0.0.12 ------- - * Release 0.0.12 * \* There is now a setuptools extension provided by \`\`testrespository\`\` making it easy to invoke testr from setup.py driven workflows. (Monty Taylor, Robert Collins) * \* BSD license file incorrectly claimed copyright by subunit contributors. (Monty Taylor) * Correct a typo in setup.py * \* .testr.conf is now shipped in the source distribution to aid folk wanting to validate that testrepository works correctly on their machine. (Robert Collins) * Add setuptools commands for running testr and coverage - -0.0.11 ------- - * Release 0.0.11 * Tweak docs * \* Fix another incompatability with Mac OS X - gdbm dbm modules don't support get. (Robert Collins, #1094330) * ReST fixes for docs - -0.0.10 ------- - * Release 0.0.10 * \* It's now possible to configure \`\`test\_run\_concurrency\`\` in \`\`.testr.conf\`\` to have concurrency defined by a callout. (Robert Collins) * Update testr help run docs for new options @@ -408,10 +379,6 @@ * \* TestCommand is now a fixture. This is used to ensure cached test instances are disposed of - if using the object to run or list tests, you will need to adjust your calls. (Robert Collins) * \* It's now possible to configure \`\`test\_run\_concurrency\`\` in \`\`.testr.conf\`\` to have concurrency defined by a callout. (Robert Collins) * Document overview - -0.0.9 ------ - * Release 0.0.9 * \* On OSX the \`\`anydbm\`\` module by default returns an implementation that doesn't support update(). Workaround that by falling back to a loop. (Robert Collins, #1091500) * Document workaround @@ -420,10 +387,6 @@ * \* \`\`testr --analyze-improvements\`\` now honours test regex filters and only analyzes matching tests. (Robert Collins) * Better documentation for setup of .testr.conf * Better keywords - -0.0.8 ------ - * Release 0.0.8 * \* \`\`testr run --analyze-isolation\`\` will search the current failing tests for spurious failures caused by interactions with other tests. (Robert Collins, #684069) * First, horribly untested, version of --analyze-failures diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/PKG-INFO new/stestr-2.1.1/PKG-INFO --- old/stestr-2.1.0/PKG-INFO 2018-06-05 21:16:22.000000000 +0200 +++ new/stestr-2.1.1/PKG-INFO 2018-08-09 14:50:02.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: stestr -Version: 2.1.0 +Version: 2.1.1 Summary: A parallel Python test runner built around subunit Home-page: http://stestr.readthedocs.io/en/latest/ Author: Matthew Treinish @@ -138,5 +138,6 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 Classifier: Topic :: Software Development :: Testing Classifier: Topic :: Software Development :: Quality Assurance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/doc/source/MANUAL.rst new/stestr-2.1.1/doc/source/MANUAL.rst --- old/stestr-2.1.0/doc/source/MANUAL.rst 2018-06-02 00:54:34.000000000 +0200 +++ new/stestr-2.1.1/doc/source/MANUAL.rst 2018-07-12 15:08:35.000000000 +0200 @@ -206,23 +206,24 @@ Running previously failed tests -''''''''''''''''''''''''''''''' +------------------------------- ``stestr run`` also enables you to run just the tests that failed in the previous run. To do this you can use the ``--failing`` argument. -A common workflow using this is:: +A common workflow using this is: - # Run tests (and some fail) - $ stestr run - # Fix currently broken tests - repeat until there are no failures. - $ stestr run --failing - # Do a full run to find anything that regressed during the reduction process. - $ stestr run +#. Run tests (and some fail):: + + $ stestr run + +#. Fix currently broken tests - repeat until there are no failures:: + + $ stestr run --failing -The ``--failing`` option turns on ``--partial`` automatically (so that if the -partial test run were to be interrupted, the failing tests that aren't run are -not lost). +#. Do a full run to find anything that regressed during the reduction process:: + + $ stestr run Another common use case is repeating a failure that occurred on a remote machine (e.g. during a jenkins test run). There are a few common ways to do @@ -231,13 +232,23 @@ Firstly, if you have a subunit stream from the run you can just load it:: $ stestr load < failing-stream - # Run the failed tests + +and then run the tests which failed from that loaded run:: + $ stestr run --failing -The streams generated by test runs are in .stestr/ named for their test -id - e.g. .stestr/0 is the first stream. Note for right now these files are -stored in subunit v1, but all of stestr commands (including load) expect a -subunit v2 stream. +If using a file type repository (which is the default) the streams generated +by test runs are in the repository path, which defaults to *.stestr/* in the +working directory, and stores the stream in a file named for their run id - +e.g. .stestr/0 is the first run. + +.. note:: + For right now these files are stored in the subunit v1 format, but all of + the stestr commands, including load, only work with the subunit v2 format. + This can be converted using the **subunit-1to2** tool in the + `python-subunit`_ package. + +.. _python-subunit: https://pypi.org/project/python-subunit/ If you have access to the remote machine you can also get the subunit stream by running:: @@ -245,7 +256,7 @@ $ stestr last --subunit > failing-stream This is often a bit easier than trying to manually pull the stream file out -of the .stestr directory. (also it will be in subunit v2) +of the .stestr directory. (also it will be in the subunit v2 format already) If you do not have a stream or access to the machine you may be able to use a list file. If you can get a file that contains one test id per line, you can diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/setup.cfg new/stestr-2.1.1/setup.cfg --- old/stestr-2.1.0/setup.cfg 2018-06-05 21:16:22.000000000 +0200 +++ new/stestr-2.1.1/setup.cfg 2018-08-09 14:50:02.000000000 +0200 @@ -18,6 +18,7 @@ Programming Language :: Python :: 3 Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 Topic :: Software Development :: Testing Topic :: Software Development :: Quality Assurance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr/__main__.py new/stestr-2.1.1/stestr/__main__.py --- old/stestr-2.1.0/stestr/__main__.py 1970-01-01 01:00:00.000000000 +0100 +++ new/stestr-2.1.1/stestr/__main__.py 2018-07-12 15:08:35.000000000 +0200 @@ -0,0 +1,19 @@ +# 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. + +import sys + +from stestr.cli import main + + +if __name__ == '__main__': + sys.exit(main(sys.argv[1:])) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr/commands/failing.py new/stestr-2.1.1/stestr/commands/failing.py --- old/stestr-2.1.0/stestr/commands/failing.py 2018-05-23 22:20:49.000000000 +0200 +++ new/stestr-2.1.1/stestr/commands/failing.py 2018-08-09 14:40:52.000000000 +0200 @@ -113,7 +113,7 @@ case.run(result) finally: result.stopTestRun() - failed = not summary.wasSuccessful() + failed = not results.wasSuccessful(summary) if failed: result = 1 else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr/commands/last.py new/stestr-2.1.1/stestr/commands/last.py --- old/stestr-2.1.0/stestr/commands/last.py 2018-05-23 22:20:52.000000000 +0200 +++ new/stestr-2.1.1/stestr/commands/last.py 2018-08-09 14:40:52.000000000 +0200 @@ -154,7 +154,7 @@ case.run(output_result) finally: output_result.stopTestRun() - failed = not summary.wasSuccessful() + failed = not results.wasSuccessful(summary) else: stream = latest_run.get_subunit_stream() failed = subunit_trace.trace(stream, stdout, post_fails=True, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr/commands/load.py new/stestr-2.1.1/stestr/commands/load.py --- old/stestr-2.1.0/stestr/commands/load.py 2018-05-23 22:20:52.000000000 +0200 +++ new/stestr-2.1.1/stestr/commands/load.py 2018-08-09 14:40:52.000000000 +0200 @@ -36,12 +36,13 @@ def get_parser(self, prog_name): parser = super(Load, self).get_parser(prog_name) parser.add_argument("files", nargs="*", default=False, + help="The subunit v2 stream files to load into the" + " repository") + parser.add_argument("--partial", action="store_true", + default=False, help="DEPRECATED: The stream being loaded was a " "partial run. This option is deprecated and no " "does anything. It will be removed in the future") - parser.add_argument("--partial", action="store_true", - default=False, - help="The stream being loaded was a partial run.") parser.add_argument("--force-init", action="store_true", default=False, help="Initialise the repository if it does not " @@ -55,11 +56,11 @@ parser.add_argument("--subunit-trace", action='store_true', default=False, help="Display the loaded stream through the " - "subunit-trace output filter") + "subunit-trace output filter") parser.add_argument('--color', action='store_true', default=False, help='Enable color output in the subunit-trace ' 'output, if subunit-trace output is enabled. If ' - 'subunit-trace is disable this does nothing.') + 'subunit-trace is disable this does nothing.') parser.add_argument('--abbreviate', action='store_true', dest='abbreviate', help='Print one character status for each test') @@ -218,7 +219,7 @@ if pretty_out and not subunit_out: subunit_trace.print_fails(stdout) subunit_trace.print_summary(stdout, elapsed_time) - if not summary_result.wasSuccessful(): + if not results.wasSuccessful(summary_result): return 1 else: return 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr/commands/run.py new/stestr-2.1.1/stestr/commands/run.py --- old/stestr-2.1.0/stestr/commands/run.py 2018-05-23 22:20:52.000000000 +0200 +++ new/stestr-2.1.1/stestr/commands/run.py 2018-08-09 14:40:52.000000000 +0200 @@ -29,6 +29,7 @@ from stestr import output from stestr.repository import abstract as repository from stestr.repository import util +from stestr import results from stestr.testlist import parse_list from stestr import user_config @@ -133,8 +134,8 @@ return parser def get_description(self): - help_str = "Run the tests for a project and load them into a " - "repository." + help_str = ( + "Run the tests for a project and store them into the repository.") return help_str def take_action(self, parsed_args): @@ -346,7 +347,7 @@ stream.run(summary) finally: summary.stopTestRun() - if not summary.wasSuccessful(): + if not results.wasSuccessful(summary): result = 1 if result: return result @@ -495,7 +496,7 @@ stream.run(summary) finally: summary.stopTestRun() - if not summary.wasSuccessful(): + if not results.wasSuccessful(summary): result = 1 if result: return result diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr/results.py new/stestr-2.1.1/stestr/results.py --- old/stestr-2.1.0/stestr/results.py 2017-12-08 22:00:26.000000000 +0100 +++ new/stestr-2.1.1/stestr/results.py 2018-08-09 14:40:52.000000000 +0200 @@ -17,6 +17,11 @@ from stestr import output +def wasSuccessful(summary): + return not (summary.errors or summary.failures or + summary.unexpectedSuccesses) + + class SummarizingResult(testtools.StreamSummary): def __init__(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr/selection.py new/stestr-2.1.1/stestr/selection.py --- old/stestr-2.1.0/stestr/selection.py 2017-12-08 21:59:37.000000000 +0100 +++ new/stestr-2.1.1/stestr/selection.py 2018-07-12 15:08:35.000000000 +0200 @@ -12,6 +12,7 @@ import contextlib import re +import sys def filter_tests(filters, test_ids): @@ -26,7 +27,17 @@ """ if filters is None: return test_ids - _filters = list(map(re.compile, filters)) + + _filters = [] + for f in filters: + if isinstance(f, str): + try: + _filters.append(re.compile(f)) + except re.error: + print("Invalid regex: %s provided in filters" % f) + sys.exit(5) + else: + _filters.append(f) def include(test_id): for pred in _filters: @@ -51,7 +62,12 @@ comment = 'Skipped because of regex %s:' % line_regex if not line_regex: continue - regex_comment_lst.append((re.compile(line_regex), comment, [])) + try: + regex_comment_lst.append((re.compile(line_regex), comment, [])) + except re.error: + print("Invalid regex: %s in provided blacklist file" % + line_regex) + sys.exit(5) return regex_comment_lst @@ -62,8 +78,13 @@ # Before the # is the regex line_regex = split_line[0].strip() if line_regex: - lines.append(line_regex) - return '|'.join(lines) + try: + lines.append(re.compile(line_regex)) + except re.error: + print("Invalid regex: %s in provided whitelist file" % + line_regex) + sys.exit(5) + return lines def construct_list(test_ids, blacklist_file=None, whitelist_file=None, @@ -87,15 +108,14 @@ if not regexes: regexes = None # handle the other false things + white_re = None if whitelist_file: white_re = _get_regex_from_whitelist_file(whitelist_file) - else: - white_re = '' if not regexes and white_re: - regexes = [white_re] + regexes = white_re elif regexes and white_re: - regexes.append(white_re) + regexes += white_re if blacklist_file: black_data = black_reader(blacklist_file) @@ -104,7 +124,11 @@ if black_regex: msg = "Skipped because of regexp provided as a command line argument:" - record = (re.compile(black_regex), msg, []) + try: + record = (re.compile(black_regex), msg, []) + except re.error: + print("Invalid regex: %s used for black_regex" % black_regex) + sys.exit(5) if black_data: black_data.append(record) else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr/subunit_trace.py new/stestr-2.1.1/stestr/subunit_trace.py --- old/stestr-2.1.0/stestr/subunit_trace.py 2018-05-23 22:20:52.000000000 +0200 +++ new/stestr-2.1.1/stestr/subunit_trace.py 2018-08-09 14:40:52.000000000 +0200 @@ -29,6 +29,7 @@ import testtools from stestr import colorizer +from stestr import results # NOTE(mtreinish) on python3 anydbm was renamed dbm and the python2 dbm module # was renamed to dbm.ndbm, this block takes that into account @@ -388,7 +389,7 @@ if count_tests('status', '^success$') == 0: print("\nNo tests were successful during the run") return 1 - return 0 if summary.wasSuccessful() else 1 + return 0 if results.wasSuccessful(summary) else 1 def main(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr/tests/files/failing-tests new/stestr-2.1.1/stestr/tests/files/failing-tests --- old/stestr-2.1.0/stestr/tests/files/failing-tests 2016-12-21 22:26:40.000000000 +0100 +++ new/stestr-2.1.1/stestr/tests/files/failing-tests 2018-08-09 14:40:52.000000000 +0200 @@ -21,3 +21,7 @@ def test_pass_list(self): test_list = ['test', 'a', 'b'] self.assertIn('fail', test_list) + + def test_unexpected_pass(self): + self.expectFailure("we are sad", + self.assertEqual, 1, 1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr/tests/files/passing-tests new/stestr-2.1.1/stestr/tests/files/passing-tests --- old/stestr-2.1.0/stestr/tests/files/passing-tests 2016-12-21 22:26:40.000000000 +0100 +++ new/stestr-2.1.1/stestr/tests/files/passing-tests 2018-08-09 14:40:52.000000000 +0200 @@ -21,3 +21,7 @@ def test_pass_list(self): test_list = ['test', 'a', 'b'] self.assertIn('test', test_list) + + def test_xfail(self): + self.expectFailure("we are sad", + self.assertEqual, 1, 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr/tests/test_return_codes.py new/stestr-2.1.1/stestr/tests/test_return_codes.py --- old/stestr-2.1.0/stestr/tests/test_return_codes.py 2018-05-23 22:20:52.000000000 +0200 +++ new/stestr-2.1.1/stestr/tests/test_return_codes.py 2018-08-09 14:40:52.000000000 +0200 @@ -127,6 +127,12 @@ def test_parallel_fails(self): self.assertRunExit('stestr run', 1) + def test_parallel_passing_xfail(self): + self.assertRunExit('stestr run xfail', 0) + + def test_parallel_fails_unxsuccess(self): + self.assertRunExit('stestr run unexpected', 1) + def test_parallel_blacklist(self): fd, path = tempfile.mkstemp() self.addCleanup(os.remove, path) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr/tests/test_selection.py new/stestr-2.1.1/stestr/tests/test_selection.py --- old/stestr-2.1.0/stestr/tests/test_selection.py 2017-01-11 21:40:42.000000000 +0100 +++ new/stestr-2.1.1/stestr/tests/test_selection.py 2018-07-12 15:08:35.000000000 +0200 @@ -30,6 +30,14 @@ result = selection.filter_tests(['a'], test_list) self.assertEqual(['a'], result) + def test_filter_invalid_regex(self): + test_list = ['a', 'b', 'c'] + with mock.patch('sys.exit', side_effect=ImportError) as mock_exit: + self.assertRaises(ImportError, selection.filter_tests, + ['fake_regex_with_bad_part[The-BAD-part]'], + test_list) + mock_exit.assert_called_once_with(5) + class TestBlackReader(base.TestCase): def test_black_reader(self): @@ -51,6 +59,16 @@ self.assertIn('search', dir(r[0])) # like a compiled regexp self.assertEqual(note_cnt, 4) + def test_invalid_regex(self): + blacklist_file = six.StringIO() + blacklist_file.write("fake_regex_with_bad_part[The-BAD-part]") + blacklist_file.seek(0) + with mock.patch('six.moves.builtins.open', + return_value=blacklist_file): + with mock.patch('sys.exit') as mock_exit: + selection.black_reader('fake_path') + mock_exit.assert_called_once_with(5) + class TestConstructList(base.TestCase): def test_simple_re(self): @@ -63,6 +81,14 @@ result = selection.construct_list(test_lists, black_regex='foo') self.assertEqual(list(result), ['fake_test(scen)[tag,bar])']) + def test_invalid_black_re(self): + test_lists = ['fake_test(scen)[tag,bar])', 'fake_test(scen)[egg,foo])'] + invalid_regex = "fake_regex_with_bad_part[The-BAD-part]" + with mock.patch('sys.exit', side_effect=ImportError) as exit_mock: + self.assertRaises(ImportError, selection.construct_list, + test_lists, black_regex=invalid_regex) + exit_mock.assert_called_once_with(5) + def test_blacklist(self): black_list = [(re.compile('foo'), 'foo not liked', [])] test_lists = ['fake_test(scen)[tag,bar])', 'fake_test(scen)[egg,foo])'] @@ -74,7 +100,7 @@ self.assertEqual(list(result), ['fake_test(scen)[tag,bar])']) def test_whitelist(self): - white_list = 'fake_test1|fake_test2' + white_list = [re.compile('fake_test1'), re.compile('fake_test2')] test_lists = ['fake_test1[tg]', 'fake_test2[tg]', 'fake_test3[tg]'] white_getter = 'stestr.selection._get_regex_from_whitelist_file' with mock.patch(white_getter, @@ -84,8 +110,18 @@ self.assertEqual(set(result), set(('fake_test1[tg]', 'fake_test2[tg]'))) + def test_whitelist_invalid_regex(self): + whitelist_file = six.StringIO() + whitelist_file.write("fake_regex_with_bad_part[The-BAD-part]") + whitelist_file.seek(0) + with mock.patch('six.moves.builtins.open', + return_value=whitelist_file): + with mock.patch('sys.exit') as mock_exit: + selection._get_regex_from_whitelist_file('fake_path') + mock_exit.assert_called_once_with(5) + def test_whitelist_blacklist_re(self): - white_list = 'fake_test1|fake_test2' + white_list = [re.compile('fake_test1'), re.compile('fake_test2')] test_lists = ['fake_test1[tg]', 'fake_test2[spam]', 'fake_test3[tg,foo]', 'fake_test4[spam]'] black_list = [(re.compile('spam'), 'spam not liked', [])] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr.egg-info/PKG-INFO new/stestr-2.1.1/stestr.egg-info/PKG-INFO --- old/stestr-2.1.0/stestr.egg-info/PKG-INFO 2018-06-05 21:16:21.000000000 +0200 +++ new/stestr-2.1.1/stestr.egg-info/PKG-INFO 2018-08-09 14:50:01.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: stestr -Version: 2.1.0 +Version: 2.1.1 Summary: A parallel Python test runner built around subunit Home-page: http://stestr.readthedocs.io/en/latest/ Author: Matthew Treinish @@ -138,5 +138,6 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 Classifier: Topic :: Software Development :: Testing Classifier: Topic :: Software Development :: Quality Assurance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr.egg-info/SOURCES.txt new/stestr-2.1.1/stestr.egg-info/SOURCES.txt --- old/stestr-2.1.0/stestr.egg-info/SOURCES.txt 2018-06-05 21:16:22.000000000 +0200 +++ new/stestr-2.1.1/stestr.egg-info/SOURCES.txt 2018-08-09 14:50:01.000000000 +0200 @@ -41,6 +41,7 @@ doc/source/api/repository/memory.rst doc/source/api/repository/sql.rst stestr/__init__.py +stestr/__main__.py stestr/bisect_tests.py stestr/cli.py stestr/colorizer.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/stestr.egg-info/pbr.json new/stestr-2.1.1/stestr.egg-info/pbr.json --- old/stestr-2.1.0/stestr.egg-info/pbr.json 2018-06-05 21:16:21.000000000 +0200 +++ new/stestr-2.1.1/stestr.egg-info/pbr.json 2018-08-09 14:50:01.000000000 +0200 @@ -1 +1 @@ -{"git_version": "7d8f9ea", "is_release": true} \ No newline at end of file +{"git_version": "48e3c05", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.1.0/tox.ini new/stestr-2.1.1/tox.ini --- old/stestr-2.1.0/tox.ini 2017-12-08 22:00:26.000000000 +0100 +++ new/stestr-2.1.1/tox.ini 2018-08-09 14:40:52.000000000 +0200 @@ -1,6 +1,6 @@ [tox] minversion = 1.6 -envlist = py36,py35,py34,py27,pep8 +envlist = py37,py36,py35,py34,py27,pep8 skipsdist = True [testenv]
