(self)
| 845 | ]) |
| 846 | |
| 847 | def test_custom_format_specifier(self): |
| 848 | class CustomFormat: |
| 849 | def __format__(self, format_spec): |
| 850 | return format_spec |
| 851 | |
| 852 | self.assertEqual(f'{CustomFormat():\n}', '\n') |
| 853 | self.assertEqual(f'{CustomFormat():\u2603}', '☃') |
| 854 | with self.assertWarns(SyntaxWarning): |
| 855 | exec(r'f"{F():¯\_(ツ)_/¯}"', {'F': CustomFormat}) |
| 856 | |
| 857 | def test_side_effect_order(self): |
| 858 | class X: |
nothing calls this directly
no test coverage detected