[Lldb-commits] [lldb] r333640 - Remove the TestSequenceFunctions "example" test
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu May 31 02:56:38 PDT 2018
Author: labath
Date: Thu May 31 02:56:38 2018
New Revision: 333640
URL: http://llvm.org/viewvc/llvm-project?rev=333640&view=rev
Log:
Remove the TestSequenceFunctions "example" test
This test was using unittest (not unittest2) as the test framework, and
it worked with dotest only by accident. Remove it as we have a much more
realistic example test in test/testcases/sample_test.
Removed:
lldb/trunk/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py
Removed: lldb/trunk/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py?rev=333639&view=auto
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py (removed)
@@ -1,34 +0,0 @@
-"""An example unittest copied from python tutorial."""
-
-import random
-import unittest
-import traceback
-
-
-class SequenceFunctionsTestCase(unittest.TestCase):
-
- def setUp(self):
- # traceback.print_stack()
- self.seq = list(range(10))
-
- def tearDown(self):
- # traceback.print_stack()
- pass
-
- def test_shuffle(self):
- # make sure the shuffled sequence does not lose any elements
- random.shuffle(self.seq)
- self.seq.sort()
- self.assertEqual(self.seq, list(range(10)))
-
- def test_choice(self):
- element = random.choice(self.seq)
- self.assertTrue(element in self.seq)
-
- def test_sample(self):
- self.assertRaises(ValueError, random.sample, self.seq, 20)
- for element in random.sample(self.seq, 5):
- self.assertTrue(element in self.seq)
-
-if __name__ == '__main__':
- unittest.main()
More information about the lldb-commits
mailing list