コード例 #1
0
ファイル: test_threads.py プロジェクト: ChillarAnand/celery
 def test_stack(self):
     x = _FastLocalStack()
     x.push(['foo'])
     x.push(['bar'])
     assert x.top == ['bar']
     assert len(x) == 2
     x.pop()
     assert x.top == ['foo']
     x.pop()
     assert x.top is None
コード例 #2
0
ファイル: test_threads.py プロジェクト: AnSavvides/celery
 def test_stack(self):
     x = _FastLocalStack()
     x.push(['foo'])
     x.push(['bar'])
     self.assertEqual(x.top, ['bar'])
     self.assertEqual(len(x), 2)
     x.pop()
     self.assertEqual(x.top, ['foo'])
     x.pop()
     self.assertIsNone(x.top)
コード例 #3
0
 def test_stack(self):
     x = _FastLocalStack()
     x.push(['foo'])
     x.push(['bar'])
     self.assertEqual(x.top, ['bar'])
     self.assertEqual(len(x), 2)
     x.pop()
     self.assertEqual(x.top, ['foo'])
     x.pop()
     self.assertIsNone(x.top)
コード例 #4
0
 def test_stack(self):
     x = _FastLocalStack()
     x.push(['foo'])
     x.push(['bar'])
     assert x.top == ['bar']
     assert len(x) == 2
     x.pop()
     assert x.top == ['foo']
     x.pop()
     assert x.top is None