Example #1
0
 def test_on_blocking(self, getframeinfo):
     frame = Mock(name='frame')
     with self.assertRaises(RuntimeError):
         debug._on_blocking(1, frame)
         getframeinfo.assert_called_with(frame)
Example #2
0
def test_on_blocking(patching):
    getframeinfo = patching('inspect.getframeinfo')
    frame = Mock(name='frame')
    with pytest.raises(RuntimeError):
        debug._on_blocking(1, frame)
        getframeinfo.assert_called_with(frame)
Example #3
0
def test_on_blocking(patching):
    getframeinfo = patching('inspect.getframeinfo')
    frame = Mock(name='frame')
    with pytest.raises(RuntimeError):
        debug._on_blocking(1, frame)
        getframeinfo.assert_called_with(frame)
Example #4
0
 def test_on_blocking(self, getframeinfo):
     frame = Mock(name='frame')
     with self.assertRaises(RuntimeError):
         debug._on_blocking(1, frame)
         getframeinfo.assert_called_with(frame)