Lines Matching refs:self

12     def test_xxo_new(self):
13 xxo = self.module.Xxo()
15 def test_xxo_attributes(self):
16 xxo = self.module.Xxo()
17 with self.assertRaises(AttributeError):
19 with self.assertRaises(AttributeError):
23 self.assertEqual(xxo.foo, 1234)
26 with self.assertRaises(AttributeError):
29 def test_foo(self):
31 self.assertEqual(self.module.foo(1, 2), 3)
33 def test_str(self):
34 self.assertTrue(issubclass(self.module.Str, str))
35 self.assertIsNot(self.module.Str, str)
37 custom_string = self.module.Str("abcd")
38 self.assertEqual(custom_string, "abcd")
39 self.assertEqual(custom_string.upper(), "ABCD")
41 def test_new(self):
42 xxo = self.module.new()
43 self.assertEqual(xxo.demo("abc"), "abc")
49 def test_xxo_demo(self):
50 xxo = self.module.Xxo()
51 other = self.module.Xxo()
52 self.assertEqual(xxo.demo("abc"), "abc")
53 self.assertEqual(xxo.demo(xxo), xxo)
54 self.assertEqual(xxo.demo(other), other)
55 self.assertEqual(xxo.demo(0), None)
57 def test_error(self):
58 with self.assertRaises(self.module.Error):
59 raise self.module.Error
61 def test_buffer(self):
62 xxo = self.module.Xxo()
63 self.assertEqual(xxo.x_exports, 0)
65 self.assertEqual(xxo.x_exports, 1)
67 self.assertEqual(xxo.x_exports, 2)
69 self.assertEqual(b1[0], 1)
70 self.assertEqual(b2[0], 1)
76 def test_xxo_demo(self):
77 xxo = self.module.Xxo()
78 other = self.module.Xxo()
79 self.assertEqual(xxo.demo("abc"), "abc")
80 self.assertEqual(xxo.demo(0), None)
82 def test_roj(self):
84 with self.assertRaises(SystemError):
85 self.module.roj(0)
87 def test_null(self):
88 null1 = self.module.Null()
89 null2 = self.module.Null()
90 self.assertNotEqual(null1, null2)