This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Increased test coverage for filecmp.py
Type: enhancement Stage:
Components: Tests Versions: Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Alex.Volkov, Eduardo.Seabra, vajrasky
Priority: normal Keywords: patch

Created on 2013-08-13 16:34 by Alex.Volkov, last changed 2022-04-11 14:57 by admin.

Files
File name Uploaded Description Edit
test_filecmp.patch Alex.Volkov, 2013-08-13 16:34 hg diff output review
test_filecmp_v2.patch Alex.Volkov, 2013-08-25 18:05 review
test_filecmp.patch Eduardo.Seabra, 2013-11-23 14:40 review
Messages (4)
msg195085 - (view) Author: Alex Volkov (Alex.Volkov) * Date: 2013-08-13 16:34
I increased test coverage from 68% to 74% of filecmp.py by adding test cases in test_filecmp.py in functions phase2 & phase4 in dircmp class.
msg195123 - (view) Author: Vajrasky Kok (vajrasky) * Date: 2013-08-14 04:33
Hi Alex.

Typo in  "#Speicify subdirectories to hide".

I think you should not create WIN32 constant. Use this statement instead: @unittest.skipIf(sys.platform == "win32", "Not valid on Windows")

I think you should use addCleanup if you want to remove the directories that you create in that specific test. For example, in test_phase2_check_diff_files, you can use:
self.addCleanup(os.rmdir, check_type_dir)

That is for now.
msg196157 - (view) Author: Alex Volkov (Alex.Volkov) * Date: 2013-08-25 18:05
HI Vajrasky,

I fixed the typo in a comment and removed WIN32 constant definition from the code.

I looked at the existing tearDown method, on line 79, it calls shutil.rmtree on a directory above the files/directories I'm writing my test files, so the statements and the end of each function or combining these statements in a cleanup function is redundant, so I removed them.

Alex.
msg204035 - (view) Author: Eduardo Seabra (Eduardo.Seabra) * Date: 2013-11-23 14:40
I've also increased the test coverage of filecmp.py. Don't know if I should merge my patch with Alex.Volkov's patch. I'm uploading it as a separate patch.
History
Date User Action Args
2022-04-11 14:57:49adminsetgithub: 62928
2013-11-23 14:40:20Eduardo.Seabrasetfiles: + test_filecmp.patch
nosy: + Eduardo.Seabra
messages: + msg204035

2013-08-25 18:05:00Alex.Volkovsetfiles: + test_filecmp_v2.patch

messages: + msg196157
2013-08-14 04:33:34vajraskysetnosy: + vajrasky
messages: + msg195123
2013-08-13 16:44:05Alex.Volkovsettitle: Increased test coverage for test_filecmp -> Increased test coverage for filecmp.py
2013-08-13 16:34:54Alex.Volkovcreate