-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresearch.py
59 lines (40 loc) · 1.18 KB
/
research.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from bitarray import bitarray
from itertools import *
from timer import Timer
from random import *
from operator import itemgetter
from copy import *
from utils import *
import operator
import unittest
class TestListMethods(unittest.TestCase):
@classmethod
def setUpClass(cls):
print 'x'
def test_empty(self):
self.assertEquals(0, len([]))
self.assertNotEquals(0, len([42]))
def test_append(self):
self.assertTrue(isinstance([], list))
self.assertFalse(issubclass(list, type), 'OMG')
@unittest.skip('bad')
def test_remove(self):
self.assertRaises(ValueError, [].remove, 42)
with self.assertRaises(ValueError):
[].remove(42)
@unittest.expectedFailure
def test_fail(self):
self.assertEquals(1, 1)
# def setUp(self):
# pass
# def tearDown(self):
# pass
class X_Test(unittest.TestCase):
def runTest(self):
print 'sad'
self.assertEqual(True, False)
# unittest.main()
#
suite = unittest.TestLoader().loadTestsFromTestCase(TestListMethods)
unittest.TextTestRunner(verbosity=2).run(suite)
# print unittest.TestLoader().discover('cover_sort')