Imported Debian patch 4.7.2-3

This commit is contained in:
Timo Aaltonen
2019-05-06 08:43:34 +03:00
committed by Mario Fetka
parent 27edeba051
commit 8bc559c5a1
917 changed files with 1068993 additions and 1184676 deletions

View File

@@ -108,7 +108,7 @@ def test_lock():
assert str(e) == 'already locked: %r' % o
# Test with another class implemented locking protocol:
class Lockable:
class Lockable(object):
__locked = False
def __lock__(self):
self.__locked = True
@@ -122,7 +122,7 @@ def test_lock():
assert str(e) == 'already locked: %r' % o
# Test with a class incorrectly implementing the locking protocol:
class Broken:
class Broken(object):
def __lock__(self):
pass
def __islocked__(self):
@@ -145,7 +145,7 @@ def test_islocked():
assert f(o) is True
# Test with another class implemented locking protocol:
class Lockable:
class Lockable(object):
__locked = False
def __lock__(self):
self.__locked = True
@@ -157,7 +157,7 @@ def test_islocked():
assert f(o) is True
# Test with a class incorrectly implementing the locking protocol:
class Broken:
class Broken(object):
__lock__ = False
def __islocked__(self):
return False
@@ -207,7 +207,7 @@ def membername(i):
return 'member%03d' % i
class DummyMember:
class DummyMember(object):
def __init__(self, i):
self.i = i
self.name = self.__name__ = membername(i)