Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Modified a couple of i18n regression tests to make them run under Win…

…dows.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16281 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c3db0b058c832f6f275f97d8e2e40c8e6f9f7e99 1 parent 723b620
Ramiro Morales authored May 26, 2011
8  tests/regressiontests/i18n/commands/extraction.py
@@ -82,7 +82,10 @@ def test_extraction_error(self):
82 82
         try:
83 83
             management.call_command('makemessages', locale=LOCALE, verbosity=0)
84 84
         except SyntaxError, e:
85  
-            self.assertEqual(str(e), 'Translation blocks must not include other block tags: blocktrans (file templates/template_with_error.html, line 3)')
  85
+            self.assertRegexpMatches(
  86
+                str(e),
  87
+                r'Translation blocks must not include other block tags: blocktrans \(file templates[/\\]template_with_error\.html, line 3\)'
  88
+            )
86 89
         finally:
87 90
             os.remove('./templates/template_with_error.html')
88 91
             os.remove('./templates/template_with_error.html.py') # Waiting for #8536 to be fixed
@@ -105,7 +108,8 @@ class IgnoredExtractorTests(ExtractorTests):
105 108
 
106 109
     def test_ignore_option(self):
107 110
         os.chdir(self.test_dir)
108  
-        management.call_command('makemessages', locale=LOCALE, verbosity=0, ignore_patterns=['ignore_dir/*'])
  111
+        pattern1 = os.path.join('ignore_dir', '*')
  112
+        management.call_command('makemessages', locale=LOCALE, verbosity=0, ignore_patterns=[pattern1])
109 113
         self.assertTrue(os.path.exists(self.PO_FILE))
110 114
         po_contents = open(self.PO_FILE, 'r').read()
111 115
         self.assertMsgId('This literal should be included.', po_contents)

0 notes on commit c3db0b0

Please sign in to comment.
Something went wrong with that request. Please try again.