higery <shoulderhig...@gmail.com> added the comment: I'm not sure it is necessary to use TempdirManager here to write tests for MANIFEST reading. The attachment is the test diff file against my last patch with the latest version.
Detail: Step 1: Write sample MANIFEST strings to the MANIFEST file with '/' as separator and get the filelist of this file(actually just created from the sample strings) Step 2: Change the os.sep to '\' and then run the sdist command, and a FileList will be generated. Bad effect is MANIFEST file will be re-written: write_manifest function called(method calling route: run->get_file_list->write_manifest). Because the content in MANIFEST has already been changed, we can just use the FileList object to get the filelist, instead of construct it from reading MANIFEST file again as other tests do. Step 3: Compare filelist_1 generated in Step1 with filelist_2 in Step2, making sure that we have replace '\' with '/' for filelist_2. Yes, we just compare the content to make sure that we has done right thing and reading MANIFEST file with '/' as separator on the platform which os.sep is '\' is ok. That's all. ---------- Added file: http://bugs.python.org/file21725/test_manifest_reading_sdist.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue828450> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com