Lines Matching refs:self
209 def _check_child_encoding_details(self,
230 self.assertEqual(encoding_details, expected_details)
233 self.assertEqual(stderr_lines, expected_warnings)
246 def test_external_target_locale_configuration(self):
250 self.maxDiff = None
269 with self.subTest(env_var=env_var,
273 self._check_child_encoding_details(var_dict,
287 def _check_c_locale_coercion(self,
304 self.maxDiff = None
325 with self.subTest(default_locale=True,
340 self._check_child_encoding_details(base_var_dict,
349 with self.subTest(env_var=env_var,
355 self._check_child_encoding_details(var_dict,
361 def test_PYTHONCOERCECLOCALE_not_set(self):
363 self._check_c_locale_coercion("utf-8", "utf-8", coerce_c_locale=None)
365 def test_PYTHONCOERCECLOCALE_not_zero(self):
369 self._check_c_locale_coercion("utf-8", "utf-8", coerce_c_locale=setting)
371 def test_PYTHONCOERCECLOCALE_set_to_warn(self):
373 self._check_c_locale_coercion("utf-8", "utf-8",
378 def test_PYTHONCOERCECLOCALE_set_to_zero(self):
380 self._check_c_locale_coercion(EXPECTED_C_LOCALE_FS_ENCODING,
385 self._check_c_locale_coercion(EXPECTED_C_LOCALE_FS_ENCODING,
391 def test_LC_ALL_set_to_C(self):
393 self._check_c_locale_coercion(EXPECTED_C_LOCALE_FS_ENCODING,
399 self._check_c_locale_coercion(EXPECTED_C_LOCALE_FS_ENCODING,
406 def test_PYTHONCOERCECLOCALE_set_to_one(self):
409 self.addCleanup(locale.setlocale, locale.LC_CTYPE, old_loc)
413 self.skipTest(str(e))
415 self.skipTest("test requires LC_CTYPE locale different than C")
417 self.skipTest("coerced LC_CTYPE locale: %s" % loc)
427 self.assertEqual(cmd.stdout.rstrip(), loc)