New submission from Zachary Ware: (Copying the nosy list from issue9607)
test_keyword has a couple of failures on Windows, all due to newline issues--see for example http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/1845/steps/test/logs/stdio. test_keywords_py_without_markers_produces_error looks for a line ending with '\n', but Windows ends it with '\r\n'. test_real_grammar_and_keyword_file, on the other hand, doesn't fail on my machine, due to the hg eol extension being enabled, but the cause of failure is filecmp.cmp working only in binary mode and paying no attention to line endings. The attached patch fixes both failures, with and without the eol extension, by using a private _compare_files function instead of filecmp.cmp. The private function makes use of universal newlines to avoid issue. Also, all instances of ``self.addCleanup(lambda ...)`` have had the lambda removed as suggested by Éric Araujo in msg187567. ---------- components: Tests files: test_keyword_cleanup.diff keywords: patch messages: 187710 nosy: benjamin.peterson, eric.araujo, gregmalcolm, r.david.murray, zach.ware priority: normal severity: normal status: open title: Fix test_keyword on Windows, clean up addCleanup type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file30002/test_keyword_cleanup.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17830> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com