Make sure the directories are inspected for source files bpo-31920
(self)
| 396 | self.assert_POT_equal(expected, output) |
| 397 | |
| 398 | def test_files_list(self): |
| 399 | """Make sure the directories are inspected for source files |
| 400 | bpo-31920 |
| 401 | """ |
| 402 | text1 = 'Text to translate1' |
| 403 | text2 = 'Text to translate2' |
| 404 | text3 = 'Text to ignore' |
| 405 | with temp_cwd(None), temp_dir(None) as sdir: |
| 406 | pymod = Path(sdir, 'pypkg', 'pymod.py') |
| 407 | pymod.parent.mkdir() |
| 408 | pymod.write_text(f'_({text1!r})', encoding='utf-8') |
| 409 | |
| 410 | pymod2 = Path(sdir, 'pkg.py', 'pymod2.py') |
| 411 | pymod2.parent.mkdir() |
| 412 | pymod2.write_text(f'_({text2!r})', encoding='utf-8') |
| 413 | |
| 414 | pymod3 = Path(sdir, 'CVS', 'pymod3.py') |
| 415 | pymod3.parent.mkdir() |
| 416 | pymod3.write_text(f'_({text3!r})', encoding='utf-8') |
| 417 | |
| 418 | assert_python_ok('-Xutf8', self.script, sdir) |
| 419 | data = Path('messages.pot').read_text(encoding='utf-8') |
| 420 | self.assertIn(f'msgid "{text1}"', data) |
| 421 | self.assertIn(f'msgid "{text2}"', data) |
| 422 | self.assertNotIn(text3, data) |
| 423 | |
| 424 | def test_help_text(self): |
| 425 | """Test that the help text is displayed.""" |
nothing calls this directly
no test coverage detected