Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
1ca76384
Commit
1ca76384
authored
Apr 26, 2013
by
Steve Strassmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing
parent
d9381ecc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
i18n/test/test_extract.py
+15
-3
i18n/test/test_generate.py
+1
-5
No files found.
i18n/test/test_extract.py
View file @
1ca76384
import
os
import
os
,
polib
from
unittest
import
TestCase
from
datetime
import
datetime
import
polib
from
datetime
import
datetime
,
timedelta
import
extract
from
execute
import
SOURCE_MSGS_DIR
# Make sure setup runs only once
SETUP_HAS_RUN
=
False
class
TestExtract
(
TestCase
):
"""
Tests functionality of i18n/extract.py
...
...
@@ -13,11 +15,21 @@ class TestExtract(TestCase):
generated_files
=
(
'django-partial.po'
,
'djangojs.po'
,
'mako.po'
)
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
()
-
timedelta
(
seconds
=
1
)
super
(
TestExtract
,
self
)
.
setUp
()
if
not
SETUP_HAS_RUN
:
self
.
run_main
()
SETUP_HAS_RUN
=
True
def
run_main
(
self
):
# Run extraction script. Warning, this takes 1 minute or more
print
"***********************"
print
"***********************"
print
"***********************"
extract
.
main
()
def
get_files
(
self
):
...
...
i18n/test/test_generate.py
View file @
1ca76384
import
os
import
string
import
polib
import
random
import
os
,
string
,
random
from
unittest
import
TestCase
from
datetime
import
datetime
,
timedelta
import
generate
from
execute
import
get_config
,
messages_dir
,
SOURCE_MSGS_DIR
,
SOURCE_LOCALE
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment