def test_stack(self): x = _LocalStack() assert x.pop() is None x.__release_local__() ident = x.__ident_func__ x.__ident_func__ = ident with pytest.raises(RuntimeError): x()[0] x.push(['foo']) assert x()[0] == 'foo' x.pop() with pytest.raises(RuntimeError): x()[0]
def test_stack(self): x = _LocalStack() self.assertIsNone(x.pop()) x.__release_local__() ident = x.__ident_func__ x.__ident_func__ = ident with self.assertRaises(RuntimeError): x()[0] x.push(['foo']) self.assertEqual(x()[0], 'foo') x.pop() with self.assertRaises(RuntimeError): x()[0]
def test_stack(self): x = _LocalStack() self.assertIsNone(x.pop()) x.__release_local__() ident = x.__ident_func__ x.__ident_func__ = ident with self.assertRaises(RuntimeError): x()[0] x.push(['foo']) self.assertEqual(x()[0], 'foo') x.pop() with self.assertRaises(RuntimeError): x()[0]
def test_stack(self): x = _LocalStack() assert x.pop() is None x.__release_local__() ident = x.__ident_func__ x.__ident_func__ = ident with pytest.raises(RuntimeError): x()[0] x.push(['foo']) assert x()[0] == 'foo' x.pop() with pytest.raises(RuntimeError): x()[0]