Skip to content
Snippets Groups Projects
Commit 65356f8a authored by Ned Batchelder's avatar Ned Batchelder
Browse files

Merge pull request #7446 from edx/ned/clean-up-eo

Change how conf/locale/eo is cleaned up, so that it happens when needed
parents dadc78aa 6401f453
No related branches found
No related tags found
No related merge requests found
......@@ -3,12 +3,13 @@ This test tests that i18n extraction (`paver i18n_extract -v`) works properly.
"""
from datetime import datetime, timedelta
import os
import sys
import string # pylint: disable=deprecated-module
import random
import re
import sys
import string
import subprocess
from unittest import TestCase
from mock import patch
from polib import pofile
from pytz import UTC
......@@ -41,6 +42,16 @@ class TestGenerate(TestCase):
extract.main(verbosity=0)
dummy.main(verbosity=0)
@classmethod
def tearDownClass(cls):
# Clear the Esperanto directory of any test artifacts
cmd = "git checkout conf/locale/eo"
sys.stderr.write("Cleaning up eo: " + cmd)
sys.stderr.flush()
returncode = subprocess.call(cmd, shell=True)
assert returncode == 0
super(TestGenerate, cls).tearDownClass()
def setUp(self):
# Subtract 1 second to help comparisons with file-modify time succeed,
# since os.path.getmtime() is not millisecond-accurate
......
......@@ -115,9 +115,6 @@ def test_lib(options):
test_suite = suites.PythonTestSuite('python tests', subsuites=lib_tests, **opts)
test_suite.run()
# Clear the Esperanto directory of any test artifacts
sh('git checkout conf/locale/eo')
@task
@needs(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment