use assertion methods
This commit is contained in:
parent
cb17094dcd
commit
ca9f128583
|
@ -13,14 +13,14 @@ class TestGetProfile(unittest.TestCase):
|
||||||
sys.setprofile(None)
|
sys.setprofile(None)
|
||||||
|
|
||||||
def test_empty(self):
|
def test_empty(self):
|
||||||
assert sys.getprofile() is None
|
self.assertIsNone(sys.getprofile())
|
||||||
|
|
||||||
def test_setget(self):
|
def test_setget(self):
|
||||||
def fn(*args):
|
def fn(*args):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
sys.setprofile(fn)
|
sys.setprofile(fn)
|
||||||
assert sys.getprofile() == fn
|
self.assertIs(sys.getprofile(), fn)
|
||||||
|
|
||||||
class HookWatcher:
|
class HookWatcher:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
Loading…
Reference in New Issue