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
a173270e
Commit
a173270e
authored
Jun 09, 2016
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pylint-identified issues in i18n_tests
parent
e7caf9b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
common/lib/i18n_tests/test_extract_and_generate.py
+7
-2
No files found.
common/lib/i18n_tests/test_extract_and_generate.py
View file @
a173270e
...
...
@@ -28,6 +28,8 @@ class TestGenerate(TestCase):
@classmethod
def
setUpClass
(
cls
):
super
(
TestGenerate
,
cls
)
.
setUpClass
()
sys
.
stderr
.
write
(
"
\n
This test tests that i18n extraction (`paver i18n_extract`) works properly. "
"If you experience failures, please check that all instances of `gettext` and "
...
...
@@ -53,6 +55,8 @@ class TestGenerate(TestCase):
super
(
TestGenerate
,
cls
)
.
tearDownClass
()
def
setUp
(
self
):
super
(
TestGenerate
,
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
(
UTC
)
-
timedelta
(
seconds
=
1
)
...
...
@@ -83,8 +87,9 @@ class TestGenerate(TestCase):
path
=
os
.
path
.
join
(
CONFIGURATION
.
get_messages_dir
(
locale
),
mofile
)
exists
=
os
.
path
.
exists
(
path
)
self
.
assertTrue
(
exists
,
msg
=
'Missing file in locale
%
s:
%
s'
%
(
locale
,
mofile
))
self
.
assertTrue
(
datetime
.
fromtimestamp
(
os
.
path
.
getmtime
(
path
),
UTC
)
>=
self
.
start_time
,
self
.
assertGreaterEqual
(
datetime
.
fromtimestamp
(
os
.
path
.
getmtime
(
path
),
UTC
),
self
.
start_time
,
msg
=
'File not recently modified:
%
s'
%
path
)
# Segmenting means that the merge headers don't work they way they
...
...
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