Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:chajain:branches:Cloud:Openstack:Master
python-mock
remove_unittest2.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File remove_unittest2.patch of Package python-mock
--- a/docs/conf.py +++ b/docs/conf.py @@ -33,7 +33,7 @@ import os import sys import mock from mock import * # yeah, I know :-/ -import unittest2 +import unittest import __main__ if os.getcwd() not in sys.path: --- a/mock/tests/support.py +++ b/mock/tests/support.py @@ -1,8 +1,6 @@ import sys info = sys.version_info -import unittest2 - try: callable = callable --- a/mock/tests/testcallable.py +++ b/mock/tests/testcallable.py @@ -2,7 +2,7 @@ # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ -import unittest2 as unittest +import unittest from mock.tests.support import is_instance, X, SomeClass from mock import ( --- a/mock/tests/testhelpers.py +++ b/mock/tests/testhelpers.py @@ -3,7 +3,7 @@ # http://www.voidspace.org.uk/python/mock/ import six -import unittest2 as unittest +import unittest from mock import ( call, create_autospec, MagicMock, --- a/mock/tests/testmagicmethods.py +++ b/mock/tests/testmagicmethods.py @@ -16,7 +16,7 @@ import sys import textwrap import six -import unittest2 as unittest +import unittest from mock import Mock, MagicMock from mock.mock import _magics @@ -405,7 +405,7 @@ class TestMockingMagicMethods(unittest.T mock = MagicMock() def set_setattr(): mock.__setattr__ = lambda self, name: None - self.assertRaisesRegex(AttributeError, + six.assertRaisesRegex(self, AttributeError, "Attempting to set unsupported magic method '__setattr__'.", set_setattr ) --- a/mock/tests/testmock.py +++ b/mock/tests/testmock.py @@ -8,7 +8,7 @@ import sys import tempfile import six -import unittest2 as unittest +import unittest import mock from mock import ( @@ -207,7 +207,7 @@ class MockTest(unittest.TestCase): mock = create_autospec(f) mock.side_effect = ValueError('Bazinga!') - self.assertRaisesRegex(ValueError, 'Bazinga!', mock) + six.assertRaisesRegex(self, ValueError, 'Bazinga!', mock) @unittest.skipUnless('java' in sys.platform, 'This test only applies to Jython') @@ -503,7 +503,7 @@ class MockTest(unittest.TestCase): # this should be allowed mock.something - self.assertRaisesRegex( + six.assertRaisesRegex(self, AttributeError, "Mock object has no attribute 'something_else'", getattr, mock, 'something_else' @@ -522,12 +522,12 @@ class MockTest(unittest.TestCase): mock.x mock.y mock.__something__ - self.assertRaisesRegex( + six.assertRaisesRegex(self, AttributeError, "Mock object has no attribute 'z'", getattr, mock, 'z' ) - self.assertRaisesRegex( + six.assertRaisesRegex(self, AttributeError, "Mock object has no attribute '__foobar__'", getattr, mock, '__foobar__' @@ -593,13 +593,13 @@ class MockTest(unittest.TestCase): def test_assert_called_with_message(self): mock = Mock() - self.assertRaisesRegex(AssertionError, 'Not called', + six.assertRaisesRegex(self, AssertionError, 'Not called', mock.assert_called_with) def test_assert_called_once_with_message(self): mock = Mock(name='geoffrey') - self.assertRaisesRegex(AssertionError, + six.assertRaisesRegex(self, AssertionError, r"Expected 'geoffrey' to be called once\.", mock.assert_called_once_with) @@ -1488,7 +1488,7 @@ class MockTest(unittest.TestCase): second = mopen().readline() self.assertEqual('abc', first) self.assertEqual('abc', second) - + def test_mock_parents(self): for Klass in Mock, MagicMock: m = Klass() --- a/mock/tests/testpatch.py +++ b/mock/tests/testpatch.py @@ -6,7 +6,7 @@ import os import sys import six -import unittest2 as unittest +import unittest from mock.tests import support from mock.tests.support import SomeClass, is_instance, callable --- a/mock/tests/testsentinel.py +++ b/mock/tests/testsentinel.py @@ -2,7 +2,7 @@ # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ -import unittest2 as unittest +import unittest from mock import sentinel, DEFAULT --- a/mock/tests/testwith.py +++ b/mock/tests/testwith.py @@ -4,7 +4,7 @@ from warnings import catch_warnings -import unittest2 as unittest +import unittest from mock.tests.support import is_instance from mock import MagicMock, Mock, patch, sentinel, mock_open, call --- a/setup.cfg +++ b/setup.cfg @@ -13,7 +13,6 @@ classifier = Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 2 - Programming Language :: Python :: 2.6 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Programming Language :: Python :: 3.2 @@ -31,7 +30,7 @@ keyword = [extras] test = - unittest2>=1.1.0 + unittest docs = jinja2<2.7:python_version<"3.3" and python_version>="3" Pygments<2:python_version<"3.3" and python_version>="3" --- a/unittest.cfg +++ b/unittest.cfg @@ -1,18 +1,18 @@ [unittest] plugins = - unittest2.plugins.debugger - unittest2.plugins.checker - unittest2.plugins.doctestloader - unittest2.plugins.matchregexp - unittest2.plugins.moduleloading - unittest2.plugins.testcoverage - unittest2.plugins.growl - unittest2.plugins.filtertests - unittest2.plugins.junitxml - unittest2.plugins.timed - unittest2.plugins.counttests - unittest2.plugins.logchannels + unittest.plugins.debugger + unittest.plugins.checker + unittest.plugins.doctestloader + unittest.plugins.matchregexp + unittest.plugins.moduleloading + unittest.plugins.testcoverage + unittest.plugins.growl + unittest.plugins.filtertests + unittest.plugins.junitxml + unittest.plugins.timed + unittest.plugins.counttests + unittest.plugins.logchannels excluded-plugins =
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor