Lines Matching refs:self
15 def test_args(self):
16 self.assertRaises(TypeError, resource.getrlimit)
17 self.assertRaises(TypeError, resource.getrlimit, 42, 42)
18 self.assertRaises(TypeError, resource.setrlimit)
19 self.assertRaises(TypeError, resource.setrlimit, 42, 42, 42)
23 def test_fsize_ismax(self):
34 self.assertEqual(resource.RLIM_INFINITY, max)
37 def test_fsize_enforced(self):
84 def test_fsize_toobig(self):
102 def test_getrusage(self):
103 self.assertRaises(TypeError, resource.getrusage)
104 self.assertRaises(TypeError, resource.getrusage, 42, 42)
120 def test_setrusage_refcount(self):
127 def __len__(self):
129 def __getitem__(self, key):
136 def test_pagesize(self):
138 self.assertIsInstance(pagesize, int)
139 self.assertGreaterEqual(pagesize, 0)
142 def test_linux_constants(self):
145 self.assertIsInstance(getattr(resource, 'RLIMIT_' + attr), int)
147 def test_freebsd_contants(self):
150 self.assertIsInstance(getattr(resource, 'RLIMIT_' + attr), int)
154 def test_prlimit(self):
155 self.assertRaises(TypeError, resource.prlimit)
156 self.assertRaises(ProcessLookupError, resource.prlimit,
159 self.assertEqual(resource.prlimit(0, resource.RLIMIT_AS), limit)
160 self.assertEqual(resource.prlimit(0, resource.RLIMIT_AS, limit),
166 def test_prlimit_refcount(self):
168 def __len__(self):
170 def __getitem__(self, key):
174 self.assertEqual(resource.prlimit(0, resource.RLIMIT_AS, BadSeq()),