Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)