(self)
| 843 | self.assertRaises(ftplib.Error, self.client.storlines, 'stor', f) |
| 844 | |
| 845 | def test_encoding_param(self): |
| 846 | encodings = ['latin-1', 'utf-8'] |
| 847 | for encoding in encodings: |
| 848 | with self.subTest(encoding=encoding): |
| 849 | self.tearDown() |
| 850 | self.setUp(encoding=encoding) |
| 851 | self.assertEqual(encoding, self.client.encoding) |
| 852 | self.test_retrbinary() |
| 853 | self.test_storbinary() |
| 854 | self.test_retrlines() |
| 855 | new_dir = self.client.mkd('/non-ascii dir \xAE') |
| 856 | self.check_data(new_dir, '/non-ascii dir \xAE') |
| 857 | # Check default encoding |
| 858 | client = ftplib.FTP(timeout=TIMEOUT) |
| 859 | self.assertEqual(DEFAULT_ENCODING, client.encoding) |
| 860 | |
| 861 | |
| 862 | @skipUnless(socket_helper.IPV6_ENABLED, "IPv6 not enabled") |
nothing calls this directly
no test coverage detected