Issue #13193: Fix distutils.filelist tests to always use / as path separator.
This commit is contained in:
parent
369cbd744e
commit
c48c16ea3a
|
@ -1,7 +1,6 @@
|
||||||
"""Tests for distutils.filelist."""
|
"""Tests for distutils.filelist."""
|
||||||
import re
|
import re
|
||||||
import unittest
|
import unittest
|
||||||
from os.path import join
|
|
||||||
from distutils import debug
|
from distutils import debug
|
||||||
from distutils.log import WARN
|
from distutils.log import WARN
|
||||||
from distutils.errors import DistutilsTemplateError
|
from distutils.errors import DistutilsTemplateError
|
||||||
|
@ -54,15 +53,15 @@ class FileListTestCase(support.LoggingSilencer,
|
||||||
|
|
||||||
# simulated file list
|
# simulated file list
|
||||||
file_list.allfiles = ['foo.tmp', 'ok', 'xo', 'four.txt',
|
file_list.allfiles = ['foo.tmp', 'ok', 'xo', 'four.txt',
|
||||||
join('global', 'one.txt'),
|
'global/one.txt',
|
||||||
join('global', 'two.txt'),
|
'global/two.txt',
|
||||||
join('global', 'files.x'),
|
'global/files.x',
|
||||||
join('global', 'here.tmp'),
|
'global/here.tmp',
|
||||||
join('f', 'o', 'f.oo'),
|
'f/o/f.oo',
|
||||||
join('dir', 'graft-one'),
|
'dir/graft-one',
|
||||||
join('dir', 'dir2', 'graft2'),
|
'dir/dir2/graft2',
|
||||||
join('dir3', 'ok'),
|
'dir3/ok',
|
||||||
join('dir3', 'sub', 'ok.txt'),
|
'dir3/sub/ok.txt',
|
||||||
]
|
]
|
||||||
|
|
||||||
for line in MANIFEST_IN.split('\n'):
|
for line in MANIFEST_IN.split('\n'):
|
||||||
|
@ -70,9 +69,8 @@ class FileListTestCase(support.LoggingSilencer,
|
||||||
continue
|
continue
|
||||||
file_list.process_template_line(line)
|
file_list.process_template_line(line)
|
||||||
|
|
||||||
wanted = ['ok', 'four.txt', join('global', 'one.txt'),
|
wanted = ['ok', 'four.txt', 'global/one.txt', 'global/two.txt',
|
||||||
join('global', 'two.txt'), join('f', 'o', 'f.oo'),
|
'f/o/f.oo', 'dir/graft-one', 'dir/dir2/graft2']
|
||||||
join('dir', 'graft-one'), join('dir', 'dir2', 'graft2')]
|
|
||||||
|
|
||||||
self.assertEqual(file_list.files, wanted)
|
self.assertEqual(file_list.files, wanted)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue