﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26687	i18n symlinked .po test: Fix assertion which is wrong for Windows	Ramiro Morales	Ramiro Morales	"On currently supoorted Python 3.x versions, the `i18n.test_extraction.SymlinkExtractorTests.test_symlink` test case fails when run on Windows with:

{{{
[00:08:26] ======================================================================
[00:08:26] FAIL: test_symlink (i18n.test_extraction.SymlinkExtractorTests)
[00:08:26] ----------------------------------------------------------------------
[00:08:26] Traceback (most recent call last):
[00:08:26]   File ""C:\projects\django\tests\i18n\test_extraction.py"", line 557, in test_symlink
[00:08:26] AssertionError: 'templates_symlinked/test.html' not found in '# SOME DESCRIPTIV
[00:08:26] E TITLE.\n# Copyright (C) YEAR THE PACKAGE\'S COPYRIGHT HOLDER\n# This file is distributed under the same license as the PACKAGE package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid """"\nmsgstr """"\n""Project-Id-Version: PACKAGE VERSION\\n""\n""Report-Msgid-Bugs-To: \\n""\n""POT-Creation-Date: 2016-05-30 09:33+0000\\n""\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n""\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n""\n""Language-Team: LANGUAGE <LL@li.org>\\n""\n""Language: \\n""\n""MIME-Version: 1.0\\n""\n""Content-Type: text/plain; charset=UTF-8\\n""\n""Content-Transfer-Encoding: 8bit\\n""\n""Plural-Forms: nplurals=2; plural=(n != 1);\\n""\n\n#. Translators: This comment should be extracted\n#: .\\__init__.py:4\nmsgid ""This is a translatable string.""\nmsgstr """"\n\n#: .\\__init__.py:7\nmsgid ""This is another translatable string.""\nmsgstr """"\n\n#: .\\__init__.py:12\n#, python-format\nmsgid ""%(number)s Foo""\nmsgid_plural ""%(number)s Foos""\nmsgstr[0] """"\nmsgstr[1] """"\n\n#: .\\__init__.py:14\nmsgid ""Size""\nmsgstr """"\n\n#.
[00:08:26]  Translators: Django comment block for translators\n#. string\'s meaning unveiled\n#: .\\__init__.py:17 .\\templates\\test.html:5 .\\templates\\test.html:76\n#: .\\templates_symlinked\\test.html:5 .\\templates_symlinked\\test.html:76\nmsgid ""This literal should be 
...
}}}

This is easily fixable by replacing the assert, as we already do in other test cases, to check for a PO location comment that can have non-Unix path separators. 

This was uncovered by running our tests on Appveyor:

https://ci.appveyor.com/project/ramiro/django/build/34/job/6e9dawga1awks006#L105

Because there they are run as the Windows Administrator account (one of the conditions necessary to actually reach the assert for this platform), something which usually doesn't happen on a developer workstation."	Bug	closed	Internationalization	dev	Normal	fixed	windows i18n symlink os.symlink		Ready for checkin	1	0	0	0	0	0
