New submission from Steven Barker:

While working on a fix for issue 1234674, I found that the first test method in 
Lib/test/test_filecmp.py (FileCompareTestCase.test_matching) has switched up 
messages in its AssertEquals calls. The first two asserts have the message that 
should belong to the second two, and visa versa.

I've prepared a very simple patch that switches around the AssertEquals 
arguments so that the messages match what is being tested. The behavior checked 
by the asserts remains exactly the same, only the message printed if an assert 
fails will be different.

The test still passes. If you want to see the wrong message get displayed, the 
patch I uploaded for issue 1234674 may cause the test edited here to fail 
intermittently (it depend on whether two files are created in a shorter time 
than your filesystems's mtime resolution in the setup code). The failures are 
not affected by this patch, but with it you'll get the right message rather 
than a wrong one.

----------
components: Tests
files: filecmp_test_messages.diff
keywords: patch
messages: 217970
nosy: Steven.Barker
priority: normal
severity: normal
status: open
title: Some asserts in test_filecmp have the wrong messages
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file35160/filecmp_test_messages.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21445>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to