#35504: Bug running test i18n.test_extraction.UnchangedPoExtractionTests on WSL
cause of CRLF/LF issue
-------------------------------------+-------------------------------------
               Reporter:  gaweng     |          Owner:  nobody
                   Type:  Bug        |         Status:  new
              Component:  Testing    |        Version:  dev
  framework                          |       Keywords:  PoExtraction, WSL,
               Severity:  Normal     |  Test
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Bug is only occurs in WSL.

 Steps to reproduce:
 - creating an venv
 - cloning the repo and installing all dependencies
 - run test i18n.test_extraction.UnchangedPoExtractionTests

 Reason:
 The failure is causing CRLF on Windows System but running the tests in WSL
 expecting LF, so the po file is regenerated and the date doesn't match.

 Workaround:
 You can change django.po.tmp file to LF Line endings, than tests run
 without errors.
 Alternatively, you also can change the line ending to LF in git. But than
 it's also LF if you're using it in windows environment with powershell.

 Error-Message:
 {{{
 .F
 ======================================================================
 FAIL: test_po_remains_unchanged
 (i18n.test_extraction.UnchangedPoExtractionTests)
 PO files are unchanged unless there are new changes.
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/mnt/c/git/contributing/django/tests/i18n/test_extraction.py",
 line 1086, in test_po_remains_unchanged
     self.assertEqual(po_contents, self.original_po_contents)
 AssertionError: '# SO[187 chars]R.\n# \n#, fuzzy\nmsgid ""\nmsgstr
 ""\n"Projec[580 chars]."\n' != '# SO[187 chars]R.\n#\n#, fuzzy\nmsgid
 ""\nmsgstr ""\n"Project[579 chars]."\n'
 Diff is 971 characters long. Set self.maxDiff to None to see it.

 ----------------------------------------------------------------------
 Ran 2 tests in 0.159s
 }}}

 Comment on Error-Message:
 The error message is only referring on the new generated po file, cause it
 doesn't looks equal for gettext cause of CRLF instead of LF
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35504>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018ff7474fe7-417adb1c-d0bd-4e48-9452-7d849e1f1e2e-000000%40eu-central-1.amazonses.com.

Reply via email to