def setUpClass(cls): sys.stderr.write( "\nExtracting i18n strings and generating dummy translations; " "this may take a few minutes\n" ) sys.stderr.flush() extract.main(verbosity=0) dummy.main(verbosity=0)
def setUpClass(cls): cfg = os.path.join('conf', 'locale', 'config.yaml') config.CONFIGURATION = config.Configuration(cfg) sys.stderr.write( "\nExtracting i18n strings and generating dummy translations; " "this may take a few minutes\n") sys.stderr.flush() extract.main(verbosity=0, config=cfg) dummy.main(verbosity=0, config=cfg)
def setUpClass(cls): cfg = os.path.join('conf', 'locale', 'config.yaml') config.CONFIGURATION = config.Configuration(cfg) sys.stderr.write( "\nExtracting i18n strings and generating dummy translations; " "this may take a few minutes\n" ) sys.stderr.flush() extract.main(verbosity=0, config=cfg) dummy.main(verbosity=0, config=cfg)
def setUp(self): global SETUP_HAS_RUN # Subtract 1 second to help comparisons with file-modify time succeed, # since os.path.getmtime() is not millisecond-accurate self.start_time = datetime.now(UTC) - timedelta(seconds=1) super(TestExtract, self).setUp() if not SETUP_HAS_RUN: # Run extraction script. Warning, this takes 1 minute or more extract.main(verbosity=0) SETUP_HAS_RUN = True
def setUpClass(cls): sys.stderr.write( "\nThis test tests that i18n extraction (`paver i18n_extract`) works properly. " "If you experience failures, please check that all instances of `gettext` and " "`ngettext` are used correctly. You can also try running `paver i18n_extract -v` " "locally for more detail.\n") sys.stderr.write( "\nExtracting i18n strings and generating dummy translations; " "this may take a few minutes\n") sys.stderr.flush() extract.main(verbosity=0) dummy.main(verbosity=0)
def setUpClass(cls): sys.stderr.write( "\nThis test tests that i18n extraction (`paver i18n_extract`) works properly. " "If you experience failures, please check that all instances of `gettext` and " "`ngettext` are used correctly. You can also try running `paver i18n_extract -v` " "locally for more detail.\n" ) sys.stderr.write( "\nExtracting i18n strings and generating dummy translations; " "this may take a few minutes\n" ) sys.stderr.flush() extract.main(verbosity=0) dummy.main(verbosity=0)
def setUp(self): # Skip this test because it takes too long (>1 minute) # TODO: figure out how to declare a "long-running" test suite # and add this test to it. raise SkipTest() global SETUP_HAS_RUN # Subtract 1 second to help comparisons with file-modify time succeed, # since os.path.getmtime() is not millisecond-accurate self.start_time = datetime.now(UTC) - timedelta(seconds=1) super(TestExtract, self).setUp() if not SETUP_HAS_RUN: # Run extraction script. Warning, this takes 1 minute or more extract.main() SETUP_HAS_RUN = True
def setUp(self): # Skip this test because it takes too long (>1 minute) # TODO: figure out how to declare a "long-running" test suite # and add this test to it. raise SkipTest() global SETUP_HAS_RUN # Subtract 1 second to help comparisons with file-modify time succeed, # since os.path.getmtime() is not millisecond-accurate self.start_time = datetime.now(UTC) - timedelta(seconds=1) super(TestExtract, self).setUp() if not SETUP_HAS_RUN: # Run extraction script. Warning, this takes 1 minute or more extract.main(verbosity=0) SETUP_HAS_RUN = True
def setUp(self): global SETUP_HAS_RUN super(TestExtract, self).setUp() # Subtract 1 second to help comparisons with file-modify time succeed, # since os.path.getmtime() is not millisecond-accurate self.start_time = datetime.now() - timedelta(seconds=1) self.mock_path = Path.joinpath(MOCK_DJANGO_APP_DIR, "locale", "mock") self.mock_mapped_path = Path.joinpath(MOCK_DJANGO_APP_DIR, "locale", "mock_mapped") self._setup_i18n_test_config( root_dir=MOCK_DJANGO_APP_DIR, preserve_locale_paths=(self.mock_path, ), clean_paths=(self.mock_mapped_path, ) ) self.configuration = config.Configuration(root_dir=MOCK_DJANGO_APP_DIR) if not SETUP_HAS_RUN: # Run extraction script. Warning, this takes 1 minute or more extract.main(verbosity=0, config=self.configuration._filename, root_dir=MOCK_DJANGO_APP_DIR) SETUP_HAS_RUN = True
def setUp(self): global SETUP_HAS_RUN super(TestExtract, self).setUp() # Subtract 1 second to help comparisons with file-modify time succeed, # since os.path.getmtime() is not millisecond-accurate self.start_time = datetime.now() - timedelta(seconds=1) self.mock_path = Path.joinpath(MOCK_DJANGO_APP_DIR, "locale", "mock") self.mock_mapped_path = Path.joinpath(MOCK_DJANGO_APP_DIR, "locale", "mock_mapped") self._setup_i18n_test_config(root_dir=MOCK_DJANGO_APP_DIR, preserve_locale_paths=(self.mock_path, ), clean_paths=(self.mock_mapped_path, )) self.configuration = config.Configuration(root_dir=MOCK_DJANGO_APP_DIR) if not SETUP_HAS_RUN: # Run extraction script. Warning, this takes 1 minute or more extract.main(verbosity=0, config=self.configuration._filename, root_dir=MOCK_DJANGO_APP_DIR) SETUP_HAS_RUN = True
def setUpClass(cls): extract.main() dummy.main()