Hello community, here is the log from the commit of package python-oslotest for openSUSE:Factory checked in at 2018-01-24 15:28:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-oslotest (Old) and /work/SRC/openSUSE:Factory/.python-oslotest.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslotest" Wed Jan 24 15:28:02 2018 rev:13 rq:567282 version:3.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-oslotest/python-oslotest.changes 2017-12-06 08:59:27.835063835 +0100 +++ /work/SRC/openSUSE:Factory/.python-oslotest.new/python-oslotest.changes 2018-01-24 15:28:04.701170189 +0100 @@ -1,0 +2,11 @@ +Mon Jan 15 12:03:11 UTC 2018 - [email protected] + +- update to version 3.2.0 + - Remove -U from pip install + - Remove setting of version/release from releasenotes + - Avoid tox_install.sh for constraints support + - Remove oslotest.mockpatch + - Adds mock autospec fixture + - Updated from global requirements + +------------------------------------------------------------------- Old: ---- oslotest-2.18.1.tar.gz New: ---- oslotest-3.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-oslotest.spec ++++++ --- /var/tmp/diff_new_pack.ba8dGX/_old 2018-01-24 15:28:05.797118930 +0100 +++ /var/tmp/diff_new_pack.ba8dGX/_new 2018-01-24 15:28:05.801118742 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-oslotest # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: python-oslotest -Version: 2.18.1 +Version: 3.2.0 Release: 0 Summary: OpenStack test framework License: Apache-2.0 ++++++ oslotest-2.18.1.tar.gz -> oslotest-3.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/AUTHORS new/oslotest-3.2.0/AUTHORS --- old/oslotest-2.18.1/AUTHORS 2017-09-25 16:20:22.000000000 +0200 +++ new/oslotest-3.2.0/AUTHORS 2018-01-09 16:24:40.000000000 +0100 @@ -1,6 +1,7 @@ Alessio Ababilov <[email protected]> Alex Meade <[email protected]> Alexander Gorodnev <[email protected]> +Andreas Jaeger <[email protected]> Angus Salkeld <[email protected]> Ben Nemec <[email protected]> Brant Knudson <[email protected]> @@ -8,6 +9,7 @@ ChangBo Guo(gcb) <[email protected]> Christian Berendt <[email protected]> Chuck Short <[email protected]> +Claudiu Belu <[email protected]> Danek Duvall <[email protected]> Davanum Srinivas <[email protected]> Davanum Srinivas <[email protected]> @@ -49,6 +51,7 @@ Vu Cong Tuan <[email protected]> Yuriy Taraday <[email protected]> Zhongyue Luo <[email protected]> +Zuul <[email protected]> kavithahr <[email protected]> lingyongxu <[email protected]> melissaml <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/ChangeLog new/oslotest-3.2.0/ChangeLog --- old/oslotest-2.18.1/ChangeLog 2017-09-25 16:20:22.000000000 +0200 +++ new/oslotest-3.2.0/ChangeLog 2018-01-09 16:24:40.000000000 +0100 @@ -1,6 +1,24 @@ CHANGES ======= +3.2.0 +----- + +* Adds mock autospec fixture + +3.1.0 +----- + +* Remove -U from pip install +* Avoid tox\_install.sh for constraints support +* Updated from global requirements +* Remove setting of version/release from releasenotes +* Updated from global requirements + +3.0.0 +----- + + 2.18.1 ------ @@ -11,6 +29,7 @@ * Updated from global requirements * Updated from global requirements * Deprecate oslotest.functional +* Remove oslotest.mockpatch * Updated from global requirements * Updated from global requirements * Update reno for stable/pike diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/PKG-INFO new/oslotest-3.2.0/PKG-INFO --- old/oslotest-2.18.1/PKG-INFO 2017-09-25 16:20:22.000000000 +0200 +++ new/oslotest-3.2.0/PKG-INFO 2018-01-09 16:24:41.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: oslotest -Version: 2.18.1 +Version: 3.2.0 Summary: Oslo test framework Home-page: https://docs.openstack.org/oslotest/latest/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/doc/source/user/index.rst new/oslotest-3.2.0/doc/source/user/index.rst --- old/oslotest-2.18.1/doc/source/user/index.rst 2017-09-25 16:18:11.000000000 +0200 +++ new/oslotest-3.2.0/doc/source/user/index.rst 2018-01-09 16:22:14.000000000 +0100 @@ -8,6 +8,7 @@ features debugging testing + mock-autospec cross-testing resources history \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/doc/source/user/mock-autospec.rst new/oslotest-3.2.0/doc/source/user/mock-autospec.rst --- old/oslotest-2.18.1/doc/source/user/mock-autospec.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/oslotest-3.2.0/doc/source/user/mock-autospec.rst 2018-01-09 16:22:14.000000000 +0100 @@ -0,0 +1,96 @@ +============= +Mock autospec +============= + +In typical unit tests, almost all of the dependencies are mocked or patched +(``mock.patch``), without any guarantee that the mocked methods actually exist, +or if their signatures are respected. Because of this, actual issues can be +easily overlooked and missed, as the unit tests are wrongfully passing. + +The ``mock.Mock`` class accepts a spec as an argument, which only solves half +the problem: it only checks if an attribute exists, based on the given spec. It +does not guarantee that the given attribute is actually a method, or if its +signature is respected. The Mock class does not accept an autospec argument [1]. + +``mock.patch``, ``mock.patch.object``, ``mock.patch.multiple`` accept an +autospec argument, but because of a bug [2], it cannot be used properly. + +oslotest offers a solution for problems mentioned above. + +1. https://github.com/testing-cabal/mock/issues/393 +2. https://github.com/testing-cabal/mock/issues/396 + + +Patching the ``mock`` module +============================ + +The ``oslotest.mock_fixture`` module contains 2 components: + +- patch_mock_module +- MockAutospecFixture + +Both components need to be used in order to fix various issues within ``mock`` +regarding autospec. + +patch_mock_module +----------------- + +At the moment, ``mock.patch``, ``mock.patch.object``, ``mock.patch.multiple`` +accepts the ``autospec`` argument, but it does not correctly consume the +self / cls argument of methods or class methods. + +``patch_mock_module`` addresses this issue. In order to make sure that the +original version of ``mock.patch`` is not used by the unit tests, this +function has to be called as early as possible within the test module, or +the base test module. E.g.:: + + nova/test.py + ... + from oslotest import mock_fixture + + mock_fixture.patch_mock_module() + +Additionally, this function will set the ``autospec`` argument's value +to ``True``, unless otherwise specified or these arguments are passed in: +``new_callable, create, spec``. + +MockAutospecFixture +------------------- + +``mock.Mock`` and ``mock.MagicMock`` classes do not accept any ``autospec`` +argument. This fixture will replace the ``mock.Mock`` and ``mock.MagicMock`` +classes with subclasses which accepts the said argument. + +The fixture can be used in the test ``setUp`` method. E.g.:: + + nova/test.py + ... + from oslotest import mock_fixture + + class TestCase(testtools.TestCase): + def setUp(self): + super(TestCase, self).setUp() + self.useFixture(mock_fixture.MockAutospecFixture()) + + +Mock autospec usage +=================== + +Consider the following class as an example:: + + class Foo(object): + def bar(self, a, b, c, d=None): + pass + +Using the setup described above, the following unit tests will now pass +correctly:: + + class FooTestCase(TestCase): + def test_mock_bar(self): + mock_foo = mock.Mock(autospec=Foo) + self.assertRaises(TypeError, mock_foo.bar, invalid='argument') + + @mock.patch.object(Foo, 'bar', autospec=True) + def test_patch_bar(self, mock_bar): + foo = Foo() + self.assertRaises(TypeError, foo.bar, invalid='argument') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/oslotest/mock_fixture.py new/oslotest-3.2.0/oslotest/mock_fixture.py --- old/oslotest-2.18.1/oslotest/mock_fixture.py 1970-01-01 01:00:00.000000000 +0100 +++ new/oslotest-3.2.0/oslotest/mock_fixture.py 2018-01-09 16:22:14.000000000 +0100 @@ -0,0 +1,185 @@ + +# Copyright 2017 Cloudbase Solutions Srl +# All Rights Reserved. +# +# 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 functools + +import fixtures +import mock + + +def _lazy_autospec_method(mocked_method, original_method, eat_self): + if mocked_method._mock_check_sig.__dict__.get('autospeced'): + return + + _lazy_autospec = mock.create_autospec(original_method) + if eat_self: + # consume self argument. + _lazy_autospec = functools.partial(_lazy_autospec, None) + + def _autospeced(*args, **kwargs): + _lazy_autospec(*args, **kwargs) + + # _mock_check_sig is called by the mock's __call__ method. + # which means that if a method is not called, _autospeced is not + # called. + _autospeced.__dict__['autospeced'] = True + mocked_method._mock_check_sig = _autospeced + + +class _AutospecMockMixin(object): + """Mock object that lazily autospecs the given spec's methods.""" + + def __init__(self, *args, **kwargs): + super(_AutospecMockMixin, self).__init__(*args, **kwargs) + self.__dict__['_autospec'] = kwargs.get('autospec') + _mock_methods = self.__dict__['_mock_methods'] + if _mock_methods: + # this will allow us to be able to set _mock_check_sig if + # the spec_set argument has been given. + _mock_methods.append('_mock_check_sig') + + def __getattr__(self, name): + attr = super(_AutospecMockMixin, self).__getattr__(name) + + original_spec = self.__dict__['_autospec'] + if not original_spec: + return attr + + if not hasattr(original_spec, name): + raise AttributeError(name) + + # check if the original attribute is callable, and the mock was not + # autospeced already. + original_attr = getattr(original_spec, name) + if callable(original_attr): + # lazily autospec callable attribute. + eat_self = mock.mock._must_skip(original_spec, name, + isinstance(original_spec, type)) + + _lazy_autospec_method(attr, original_attr, eat_self) + + return attr + + +class _AutospecMock(_AutospecMockMixin, mock.Mock): + pass + + +class _AutospecMagicMock(_AutospecMockMixin, mock.MagicMock): + pass + + +class MockAutospecFixture(fixtures.Fixture): + """A fixture to add / fix the autospec feature into the mock library. + + The current version of the mock library has a few unaddressed issues, which + can lead to erroneous unit tests, and can hide actual issues. This fixture + is to be removed once these issues have been addressed in the mock library. + + Issue addressed by the fixture: + + * mocked method's signature checking: + - https://github.com/testing-cabal/mock/issues/393 + - mock can only accept a spec object / class, and it makes sure that + that attribute exists, but it does not check whether the given + attribute is callable, or if its signature is respected in any way. + - adds autospec argument. If the autospec argument is given, the + mocked method's signature is also checked. + """ + + def setUp(self): + super(MockAutospecFixture, self).setUp() + + # patch both external and internal usage of Mock / MagicMock. + self.useFixture(fixtures.MonkeyPatch('mock.Mock', _AutospecMock)) + self.useFixture(fixtures.MonkeyPatch('mock.mock.Mock', _AutospecMock)) + self.useFixture(fixtures.MonkeyPatch('mock.mock.MagicMock', + _AutospecMagicMock)) + self.useFixture(fixtures.MonkeyPatch('mock.mock.MagicMock', + _AutospecMagicMock)) + + +class _patch(mock.mock._patch): + """Patch class with working autospec functionality. + + Currently, mock.patch functionality doesn't handle the autospec parameter + properly (the self argument is not consumed, causing assertions to fail). + Until the issue is addressed in the mock library, this should be used + instead. + https://github.com/testing-cabal/mock/issues/396 + """ + + def __init__(self, *args, **kwargs): + super(_patch, self).__init__(*args, **kwargs) + + # By default, autospec is None. We will consider it as True. + autospec = True if self.autospec is None else self.autospec + + # in some cases, autospec cannot be set to True. + skip_autospec = (getattr(self, attr) for attr in + ['new_callable', 'create', 'spec']) + # NOTE(claudiub): The "new" argument is always mock.DEFAULT, unless + # explicitly set otherwise. + if self.new is not mock.DEFAULT or any(skip_autospec): + # cannot autospec if new, new_callable, or create arguments given. + autospec = False + elif self.attribute: + target = getattr(self.getter(), self.attribute, None) + if isinstance(target, mock.Mock): + # NOTE(claudiub): shouldn't autospec already mocked targets. + # this can cause some issues. There are quite a few tests + # which patch mocked methods. + autospec = False + + # NOTE(claudiub): reset the self.autospec property, so we can handle + # the autospec scenario ourselves. + self._autospec = autospec + self.autospec = None + + def __enter__(self): + if self._autospec: + target = self.getter() + original_attr = getattr(target, self.attribute) + eat_self = mock.mock._must_skip(target, self.attribute, + isinstance(target, type)) + + new = super(_patch, self).__enter__() + _lazy_autospec_method(new, original_attr, eat_self) + return new + else: + return super(_patch, self).__enter__() + + +def _safe_attribute_error_wrapper(func): + def wrapper(*args, **kwargs): + try: + return func(*args, **kwargs) + except AttributeError: + pass + + return wrapper + + +def patch_mock_module(): + """Replaces the mock.patch class.""" + mock.mock._patch = _patch + + # NOTE(claudiub): mock cannot autospec partial functions properly, + # especially those created by LazyLoader objects (scheduler client), + # as it will try to copy the partial function's __name__ (which they do + # not have). + mock.mock._copy_func_details = _safe_attribute_error_wrapper( + mock.mock._copy_func_details) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/oslotest/mockpatch.py new/oslotest-3.2.0/oslotest/mockpatch.py --- old/oslotest-2.18.1/oslotest/mockpatch.py 2017-09-25 16:18:11.000000000 +0200 +++ new/oslotest-3.2.0/oslotest/mockpatch.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,35 +0,0 @@ -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. -# Copyright 2013 Hewlett-Packard Development Company, L.P. -# All Rights Reserved. -# -# 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. -"""Deprecated. - -This module is deprecated since version 1.13 and may be removed in version 2.0. -Use fixtures.Mock* classes instead. - -""" - -from debtcollector import removals -import fixtures - - -removals.removed_module("oslotest.mockpatch", replacement="fixtures", - version="1.13", removal_version="2.0", - message="Use fixtures.Mock* classes instead.") - - -PatchObject = fixtures.MockPatchObject -Patch = fixtures.MockPatch -Multiple = fixtures.MockPatchMultiple diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/oslotest/tests/unit/test_mock_fixture.py new/oslotest-3.2.0/oslotest/tests/unit/test_mock_fixture.py --- old/oslotest-2.18.1/oslotest/tests/unit/test_mock_fixture.py 1970-01-01 01:00:00.000000000 +0100 +++ new/oslotest-3.2.0/oslotest/tests/unit/test_mock_fixture.py 2018-01-09 16:22:14.000000000 +0100 @@ -0,0 +1,104 @@ +# Copyright 2017 Cloudbase Solutions Srl +# All Rights Reserved. +# +# 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 mock +import testtools + +from oslotest import mock_fixture + +# NOTE(claudiub): this needs to be called before any mock.patch calls are +# being done, and especially before the test class loads. This fixes +# the mock.patch autospec issue: +# https://github.com/testing-cabal/mock/issues/396 +# TODO(claudiub): Remove this once the fix has been merged and released. +mock_fixture.patch_mock_module() + + +class Foo(object): + def bar(self, a, b, c, d=None): + pass + + @classmethod + def classic_bar(cls, a, b, c, d=None): + pass + + @staticmethod + def static_bar(a, b, c, d=None): + pass + + +class MockSanityTestCase(testtools.TestCase): + + def setUp(self): + super(MockSanityTestCase, self).setUp() + self.useFixture(mock_fixture.MockAutospecFixture()) + + def _check_autospeced_foo(self, foo): + for method_name in ['bar', 'classic_bar', 'static_bar']: + mock_method = getattr(foo, method_name) + + # check that the methods are callable with correct args. + mock_method(mock.sentinel.a, mock.sentinel.b, mock.sentinel.c) + mock_method(mock.sentinel.a, mock.sentinel.b, mock.sentinel.c, + d=mock.sentinel.d) + mock_method.assert_has_calls([ + mock.call(mock.sentinel.a, mock.sentinel.b, mock.sentinel.c), + mock.call(mock.sentinel.a, mock.sentinel.b, mock.sentinel.c, + d=mock.sentinel.d)]) + + # assert that TypeError is raised if the method signature is not + # respected. + self.assertRaises(TypeError, mock_method) + self.assertRaises(TypeError, mock_method, mock.sentinel.a) + self.assertRaises(TypeError, mock_method, a=mock.sentinel.a) + self.assertRaises(TypeError, mock_method, mock.sentinel.a, + mock.sentinel.b, mock.sentinel.c, + e=mock.sentinel.e) + + # assert that AttributeError is raised if the method does not exist. + self.assertRaises(AttributeError, getattr, foo, 'lish') + + def test_mock_autospec_all_members(self): + for spec in [Foo, Foo()]: + foo = mock.Mock(autospec=spec) + self._check_autospeced_foo(foo) + + @mock.patch.object(Foo, 'static_bar') + @mock.patch.object(Foo, 'classic_bar') + @mock.patch.object(Foo, 'bar') + def test_patch_autospec_class(self, mock_meth, mock_cmeth, mock_smeth): + foo = Foo() + self._check_autospeced_foo(foo) + + @mock.patch.object(Foo, 'static_bar', autospec=False) + @mock.patch.object(Foo, 'classic_bar', autospec=False) + @mock.patch.object(Foo, 'bar', autospec=False) + def test_patch_autospec_class_false(self, mock_meth, mock_cmeth, + mock_smeth): + foo = Foo() + # we're checking that method signature is not enforced. + foo.bar() + mock_meth.assert_called_once_with() + foo.classic_bar() + mock_cmeth.assert_called_once_with() + foo.static_bar() + mock_smeth.assert_called_once_with() + + @mock.patch.object(Foo, 'lish', create=True) + def test_patch_create(self, mock_lish): + foo = Foo() + + foo.lish() + mock_lish.assert_called_once_with() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/oslotest.egg-info/PKG-INFO new/oslotest-3.2.0/oslotest.egg-info/PKG-INFO --- old/oslotest-2.18.1/oslotest.egg-info/PKG-INFO 2017-09-25 16:20:22.000000000 +0200 +++ new/oslotest-3.2.0/oslotest.egg-info/PKG-INFO 2018-01-09 16:24:40.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: oslotest -Version: 2.18.1 +Version: 3.2.0 Summary: Oslo test framework Home-page: https://docs.openstack.org/oslotest/latest/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/oslotest.egg-info/SOURCES.txt new/oslotest-3.2.0/oslotest.egg-info/SOURCES.txt --- old/oslotest-2.18.1/oslotest.egg-info/SOURCES.txt 2017-09-25 16:20:22.000000000 +0200 +++ new/oslotest-3.2.0/oslotest.egg-info/SOURCES.txt 2018-01-09 16:24:41.000000000 +0100 @@ -22,6 +22,7 @@ doc/source/user/features.rst doc/source/user/history.rst doc/source/user/index.rst +doc/source/user/mock-autospec.rst doc/source/user/resources.rst doc/source/user/testing.rst oslotest/__init__.py @@ -29,7 +30,7 @@ oslotest/createfile.py oslotest/functional.py oslotest/log.py -oslotest/mockpatch.py +oslotest/mock_fixture.py oslotest/modules.py oslotest/moxstubout.py oslotest/output.py @@ -46,6 +47,7 @@ oslotest/tests/unit/test_base.py oslotest/tests/unit/test_createfile.py oslotest/tests/unit/test_log.py +oslotest/tests/unit/test_mock_fixture.py oslotest/tests/unit/test_mockpatch.py oslotest/tests/unit/test_modules.py oslotest/tests/unit/test_moxstubout.py @@ -55,6 +57,8 @@ oslotest/tools/config.py releasenotes/notes/add-reno-996dd44974d53238.yaml releasenotes/notes/deprecate-functional-module-fbed600d2fa026fc.yaml +releasenotes/notes/mock-autospec-fix-9042c30dbb74032f.yaml +releasenotes/notes/remove_mockpatch-80fec29f28da5d5c.yaml releasenotes/source/conf.py releasenotes/source/index.rst releasenotes/source/ocata.rst @@ -64,5 +68,4 @@ releasenotes/source/_templates/.placeholder tools/oslo_debug_helper tools/oslo_run_cross_tests -tools/oslo_run_pre_release_tests -tools/tox_install.sh \ No newline at end of file +tools/oslo_run_pre_release_tests \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/oslotest.egg-info/pbr.json new/oslotest-3.2.0/oslotest.egg-info/pbr.json --- old/oslotest-2.18.1/oslotest.egg-info/pbr.json 2017-09-25 16:20:22.000000000 +0200 +++ new/oslotest-3.2.0/oslotest.egg-info/pbr.json 2018-01-09 16:24:40.000000000 +0100 @@ -1 +1 @@ -{"git_version": "eb544da", "is_release": true} \ No newline at end of file +{"git_version": "4f7f49a", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/oslotest.egg-info/requires.txt new/oslotest-3.2.0/oslotest.egg-info/requires.txt --- old/oslotest-2.18.1/oslotest.egg-info/requires.txt 2017-09-25 16:20:22.000000000 +0200 +++ new/oslotest-3.2.0/oslotest.egg-info/requires.txt 2018-01-09 16:24:40.000000000 +0100 @@ -1,9 +1,8 @@ fixtures>=3.0.0 -python-subunit>=0.0.18 -six>=1.9.0 +python-subunit>=1.0.0 +six>=1.10.0 testrepository>=0.0.18 -testtools>=1.4.0 +testtools>=2.2.0 mock>=2.0.0 mox3>=0.20.0 os-client-config>=1.28.0 -debtcollector>=1.2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/releasenotes/notes/mock-autospec-fix-9042c30dbb74032f.yaml new/oslotest-3.2.0/releasenotes/notes/mock-autospec-fix-9042c30dbb74032f.yaml --- old/oslotest-2.18.1/releasenotes/notes/mock-autospec-fix-9042c30dbb74032f.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/oslotest-3.2.0/releasenotes/notes/mock-autospec-fix-9042c30dbb74032f.yaml 2018-01-09 16:22:14.000000000 +0100 @@ -0,0 +1,5 @@ +--- +other: + - | + Oslotest now contains the mock_fixture module, which offers fixes to the + autospec functionality in the mock library. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/releasenotes/notes/remove_mockpatch-80fec29f28da5d5c.yaml new/oslotest-3.2.0/releasenotes/notes/remove_mockpatch-80fec29f28da5d5c.yaml --- old/oslotest-2.18.1/releasenotes/notes/remove_mockpatch-80fec29f28da5d5c.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/oslotest-3.2.0/releasenotes/notes/remove_mockpatch-80fec29f28da5d5c.yaml 2018-01-09 16:21:52.000000000 +0100 @@ -0,0 +1,5 @@ +--- +upgrade: + - | + As announced in Nov 2015, the oslotest.mockpatch module got removed now. + Please use fixtures.Mock* classes instead. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/releasenotes/source/conf.py new/oslotest-3.2.0/releasenotes/source/conf.py --- old/oslotest-2.18.1/releasenotes/source/conf.py 2017-09-25 16:18:11.000000000 +0200 +++ new/oslotest-3.2.0/releasenotes/source/conf.py 2018-01-09 16:21:52.000000000 +0100 @@ -55,16 +55,12 @@ project = u'oslotest Release Notes' copyright = u'2016, oslotest Developers' -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. +# Release notes do not need a version in the title, they span +# multiple versions. # The full version, including alpha/beta/rc tags. -import pkg_resources -release = pkg_resources.get_distribution('oslotest').version +release = '' # The short X.Y version. -version = release +version = '' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/requirements.txt new/oslotest-3.2.0/requirements.txt --- old/oslotest-2.18.1/requirements.txt 2017-09-25 16:18:11.000000000 +0200 +++ new/oslotest-3.2.0/requirements.txt 2018-01-09 16:21:52.000000000 +0100 @@ -3,11 +3,10 @@ # process, which may cause wedges in the gate later. fixtures>=3.0.0 # Apache-2.0/BSD -python-subunit>=0.0.18 # Apache-2.0/BSD -six>=1.9.0 # MIT +python-subunit>=1.0.0 # Apache-2.0/BSD +six>=1.10.0 # MIT testrepository>=0.0.18 # Apache-2.0/BSD -testtools>=1.4.0 # MIT +testtools>=2.2.0 # MIT mock>=2.0.0 # BSD mox3>=0.20.0 # Apache-2.0 os-client-config>=1.28.0 # Apache-2.0 -debtcollector>=1.2.0 # Apache-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/test-requirements.txt new/oslotest-3.2.0/test-requirements.txt --- old/oslotest-2.18.1/test-requirements.txt 2017-09-25 16:18:11.000000000 +0200 +++ new/oslotest-3.2.0/test-requirements.txt 2018-01-09 16:21:52.000000000 +0100 @@ -12,6 +12,6 @@ # this is required for the docs build jobs sphinx>=1.6.2 # BSD openstackdocstheme>=1.17.0 # Apache-2.0 -oslo.config>=4.6.0 # Apache-2.0 +oslo.config>=5.1.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/tools/tox_install.sh new/oslotest-3.2.0/tools/tox_install.sh --- old/oslotest-2.18.1/tools/tox_install.sh 2017-09-25 16:18:11.000000000 +0200 +++ new/oslotest-3.2.0/tools/tox_install.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -# Client constraint file contains this client version pin that is in conflict -# with installing the client from source. We should remove the version pin in -# the constraints file before applying it for from-source installation. - -CONSTRAINTS_FILE="$1" -shift 1 - -set -e - -# NOTE(tonyb): Place this in the tox enviroment's log dir so it will get -# published to logs.openstack.org for easy debugging. -localfile="$VIRTUAL_ENV/log/upper-constraints.txt" - -if [[ "$CONSTRAINTS_FILE" != http* ]]; then - CONSTRAINTS_FILE="file://$CONSTRAINTS_FILE" -fi -# NOTE(tonyb): need to add curl to bindep.txt if the project supports bindep -curl "$CONSTRAINTS_FILE" --insecure --progress-bar --output "$localfile" - -pip install -c"$localfile" openstack-requirements - -# This is the main purpose of the script: Allow local installation of -# the current repo. It is listed in constraints file and thus any -# install will be constrained and we need to unconstrain it. -edit-constraints "$localfile" -- "$CLIENT_NAME" - -pip install -c"$localfile" -U "$@" -exit $? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslotest-2.18.1/tox.ini new/oslotest-3.2.0/tox.ini --- old/oslotest-2.18.1/tox.ini 2017-09-25 16:18:11.000000000 +0200 +++ new/oslotest-3.2.0/tox.ini 2018-01-09 16:21:52.000000000 +0100 @@ -4,12 +4,11 @@ envlist = py35,py27,pep8 [testenv] -setenv = - VIRTUAL_ENV={envdir} - BRANCH_NAME=master - CLIENT_NAME=oslotest -install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} -deps = -r{toxinidir}/test-requirements.txt +install_command = pip install {opts} {packages} +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/requirements.txt commands = python setup.py testr --slowest --testr-args='{posargs}' [testenv:pep8]
