diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/tests/codeparser.py | 8 | ||||
-rw-r--r-- | bitbake/lib/bb/tests/cow.py | 88 |
2 files changed, 48 insertions, 48 deletions
diff --git a/bitbake/lib/bb/tests/codeparser.py b/bitbake/lib/bb/tests/codeparser.py index bb820e4037..5ea9d84803 100644 --- a/bitbake/lib/bb/tests/codeparser.py +++ b/bitbake/lib/bb/tests/codeparser.py | |||
@@ -302,7 +302,7 @@ bb.data.getVar(a(), d, False) | |||
302 | 302 | ||
303 | deps, values = bb.data.build_dependencies("FOO", set(self.d.keys()), set(), set(), self.d) | 303 | deps, values = bb.data.build_dependencies("FOO", set(self.d.keys()), set(), set(), self.d) |
304 | 304 | ||
305 | self.assertEquals(deps, set(["somevar", "bar", "something", "inexpand", "test", "test2", "a"])) | 305 | self.assertEqual(deps, set(["somevar", "bar", "something", "inexpand", "test", "test2", "a"])) |
306 | 306 | ||
307 | 307 | ||
308 | shelldata = """ | 308 | shelldata = """ |
@@ -349,7 +349,7 @@ esac | |||
349 | 349 | ||
350 | deps, values = bb.data.build_dependencies("FOO", set(self.d.keys()), set(), set(), self.d) | 350 | deps, values = bb.data.build_dependencies("FOO", set(self.d.keys()), set(), set(), self.d) |
351 | 351 | ||
352 | self.assertEquals(deps, set(["somevar", "inverted"] + execs)) | 352 | self.assertEqual(deps, set(["somevar", "inverted"] + execs)) |
353 | 353 | ||
354 | 354 | ||
355 | def test_vardeps(self): | 355 | def test_vardeps(self): |
@@ -359,7 +359,7 @@ esac | |||
359 | 359 | ||
360 | deps, values = bb.data.build_dependencies("FOO", set(self.d.keys()), set(), set(), self.d) | 360 | deps, values = bb.data.build_dependencies("FOO", set(self.d.keys()), set(), set(), self.d) |
361 | 361 | ||
362 | self.assertEquals(deps, set(["oe_libinstall"])) | 362 | self.assertEqual(deps, set(["oe_libinstall"])) |
363 | 363 | ||
364 | def test_vardeps_expand(self): | 364 | def test_vardeps_expand(self): |
365 | self.d.setVar("oe_libinstall", "echo test") | 365 | self.d.setVar("oe_libinstall", "echo test") |
@@ -368,7 +368,7 @@ esac | |||
368 | 368 | ||
369 | deps, values = bb.data.build_dependencies("FOO", set(self.d.keys()), set(), set(), self.d) | 369 | deps, values = bb.data.build_dependencies("FOO", set(self.d.keys()), set(), set(), self.d) |
370 | 370 | ||
371 | self.assertEquals(deps, set(["oe_libinstall"])) | 371 | self.assertEqual(deps, set(["oe_libinstall"])) |
372 | 372 | ||
373 | #Currently no wildcard support | 373 | #Currently no wildcard support |
374 | #def test_vardeps_wildcards(self): | 374 | #def test_vardeps_wildcards(self): |
diff --git a/bitbake/lib/bb/tests/cow.py b/bitbake/lib/bb/tests/cow.py index 35c5841f32..d149d84d0d 100644 --- a/bitbake/lib/bb/tests/cow.py +++ b/bitbake/lib/bb/tests/cow.py | |||
@@ -34,14 +34,14 @@ class COWTestCase(unittest.TestCase): | |||
34 | from bb.COW import COWDictBase | 34 | from bb.COW import COWDictBase |
35 | a = COWDictBase.copy() | 35 | a = COWDictBase.copy() |
36 | 36 | ||
37 | self.assertEquals(False, a.has_key('a')) | 37 | self.assertEqual(False, 'a' in a) |
38 | 38 | ||
39 | a['a'] = 'a' | 39 | a['a'] = 'a' |
40 | a['b'] = 'b' | 40 | a['b'] = 'b' |
41 | self.assertEquals(True, a.has_key('a')) | 41 | self.assertEqual(True, 'a' in a) |
42 | self.assertEquals(True, a.has_key('b')) | 42 | self.assertEqual(True, 'b' in a) |
43 | self.assertEquals('a', a['a'] ) | 43 | self.assertEqual('a', a['a'] ) |
44 | self.assertEquals('b', a['b'] ) | 44 | self.assertEqual('b', a['b'] ) |
45 | 45 | ||
46 | def testCopyCopy(self): | 46 | def testCopyCopy(self): |
47 | """ | 47 | """ |
@@ -60,31 +60,31 @@ class COWTestCase(unittest.TestCase): | |||
60 | c['a'] = 30 | 60 | c['a'] = 30 |
61 | 61 | ||
62 | # test separation of the two instances | 62 | # test separation of the two instances |
63 | self.assertEquals(False, c.has_key('c')) | 63 | self.assertEqual(False, 'c' in c) |
64 | self.assertEquals(30, c['a']) | 64 | self.assertEqual(30, c['a']) |
65 | self.assertEquals(10, b['a']) | 65 | self.assertEqual(10, b['a']) |
66 | 66 | ||
67 | # test copy | 67 | # test copy |
68 | b_2 = b.copy() | 68 | b_2 = b.copy() |
69 | c_2 = c.copy() | 69 | c_2 = c.copy() |
70 | 70 | ||
71 | self.assertEquals(False, c_2.has_key('c')) | 71 | self.assertEqual(False, 'c' in c_2) |
72 | self.assertEquals(10, b_2['a']) | 72 | self.assertEqual(10, b_2['a']) |
73 | 73 | ||
74 | b_2['d'] = 40 | 74 | b_2['d'] = 40 |
75 | self.assertEquals(False, c_2.has_key('d')) | 75 | self.assertEqual(False, 'd' in c_2) |
76 | self.assertEquals(True, b_2.has_key('d')) | 76 | self.assertEqual(True, 'd' in b_2) |
77 | self.assertEquals(40, b_2['d']) | 77 | self.assertEqual(40, b_2['d']) |
78 | self.assertEquals(False, b.has_key('d')) | 78 | self.assertEqual(False, 'd' in b) |
79 | self.assertEquals(False, c.has_key('d')) | 79 | self.assertEqual(False, 'd' in c) |
80 | 80 | ||
81 | c_2['d'] = 30 | 81 | c_2['d'] = 30 |
82 | self.assertEquals(True, c_2.has_key('d')) | 82 | self.assertEqual(True, 'd' in c_2) |
83 | self.assertEquals(True, b_2.has_key('d')) | 83 | self.assertEqual(True, 'd' in b_2) |
84 | self.assertEquals(30, c_2['d']) | 84 | self.assertEqual(30, c_2['d']) |
85 | self.assertEquals(40, b_2['d']) | 85 | self.assertEqual(40, b_2['d']) |
86 | self.assertEquals(False, b.has_key('d')) | 86 | self.assertEqual(False, 'd' in b) |
87 | self.assertEquals(False, c.has_key('d')) | 87 | self.assertEqual(False, 'd' in c) |
88 | 88 | ||
89 | # test copy of the copy | 89 | # test copy of the copy |
90 | c_3 = c_2.copy() | 90 | c_3 = c_2.copy() |
@@ -92,19 +92,19 @@ class COWTestCase(unittest.TestCase): | |||
92 | b_3_2 = b_2.copy() | 92 | b_3_2 = b_2.copy() |
93 | 93 | ||
94 | c_3['e'] = 4711 | 94 | c_3['e'] = 4711 |
95 | self.assertEquals(4711, c_3['e']) | 95 | self.assertEqual(4711, c_3['e']) |
96 | self.assertEquals(False, c_2.has_key('e')) | 96 | self.assertEqual(False, 'e' in c_2) |
97 | self.assertEquals(False, b_3.has_key('e')) | 97 | self.assertEqual(False, 'e' in b_3) |
98 | self.assertEquals(False, b_3_2.has_key('e')) | 98 | self.assertEqual(False, 'e' in b_3_2) |
99 | self.assertEquals(False, b_2.has_key('e')) | 99 | self.assertEqual(False, 'e' in b_2) |
100 | 100 | ||
101 | b_3['e'] = 'viel' | 101 | b_3['e'] = 'viel' |
102 | self.assertEquals('viel', b_3['e']) | 102 | self.assertEqual('viel', b_3['e']) |
103 | self.assertEquals(4711, c_3['e']) | 103 | self.assertEqual(4711, c_3['e']) |
104 | self.assertEquals(False, c_2.has_key('e')) | 104 | self.assertEqual(False, 'e' in c_2) |
105 | self.assertEquals(True, b_3.has_key('e')) | 105 | self.assertEqual(True, 'e' in b_3) |
106 | self.assertEquals(False, b_3_2.has_key('e')) | 106 | self.assertEqual(False, 'e' in b_3_2) |
107 | self.assertEquals(False, b_2.has_key('e')) | 107 | self.assertEqual(False, 'e' in b_2) |
108 | 108 | ||
109 | def testCow(self): | 109 | def testCow(self): |
110 | from bb.COW import COWDictBase | 110 | from bb.COW import COWDictBase |
@@ -115,12 +115,12 @@ class COWTestCase(unittest.TestCase): | |||
115 | 115 | ||
116 | copy = c.copy() | 116 | copy = c.copy() |
117 | 117 | ||
118 | self.assertEquals(1027, c['123']) | 118 | self.assertEqual(1027, c['123']) |
119 | self.assertEquals(4711, c['other']) | 119 | self.assertEqual(4711, c['other']) |
120 | self.assertEquals({'abc':10, 'bcd':20}, c['d']) | 120 | self.assertEqual({'abc':10, 'bcd':20}, c['d']) |
121 | self.assertEquals(1027, copy['123']) | 121 | self.assertEqual(1027, copy['123']) |
122 | self.assertEquals(4711, copy['other']) | 122 | self.assertEqual(4711, copy['other']) |
123 | self.assertEquals({'abc':10, 'bcd':20}, copy['d']) | 123 | self.assertEqual({'abc':10, 'bcd':20}, copy['d']) |
124 | 124 | ||
125 | # cow it now | 125 | # cow it now |
126 | copy['123'] = 1028 | 126 | copy['123'] = 1028 |
@@ -128,9 +128,9 @@ class COWTestCase(unittest.TestCase): | |||
128 | copy['d']['abc'] = 20 | 128 | copy['d']['abc'] = 20 |
129 | 129 | ||
130 | 130 | ||
131 | self.assertEquals(1027, c['123']) | 131 | self.assertEqual(1027, c['123']) |
132 | self.assertEquals(4711, c['other']) | 132 | self.assertEqual(4711, c['other']) |
133 | self.assertEquals({'abc':10, 'bcd':20}, c['d']) | 133 | self.assertEqual({'abc':10, 'bcd':20}, c['d']) |
134 | self.assertEquals(1028, copy['123']) | 134 | self.assertEqual(1028, copy['123']) |
135 | self.assertEquals(4712, copy['other']) | 135 | self.assertEqual(4712, copy['other']) |
136 | self.assertEquals({'abc':20, 'bcd':20}, copy['d']) | 136 | self.assertEqual({'abc':20, 'bcd':20}, copy['d']) |