Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5)

Side by Side Diff: Lib/test/test_glob.py

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/test/test_future5.py ('k') | Lib/test/test_http_cookiejar.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import unittest 1 import unittest
2 from test.support import (run_unittest, TESTFN, skip_unless_symlink, 2 from test.support import run_unittest, TESTFN, skip_unless_symlink, can_symlink
3 can_symlink, create_empty_file)
4 import glob 3 import glob
5 import os 4 import os
6 import shutil 5 import shutil
7 6
8 class GlobTests(unittest.TestCase): 7 class GlobTests(unittest.TestCase):
9 8
10 def norm(self, *parts): 9 def norm(self, *parts):
11 return os.path.normpath(os.path.join(self.tempdir, *parts)) 10 return os.path.normpath(os.path.join(self.tempdir, *parts))
12 11
13 def mktemp(self, *parts): 12 def mktemp(self, *parts):
14 filename = self.norm(*parts) 13 filename = self.norm(*parts)
15 base, file = os.path.split(filename) 14 base, file = os.path.split(filename)
16 if not os.path.exists(base): 15 if not os.path.exists(base):
17 os.makedirs(base) 16 os.makedirs(base)
18 create_empty_file(filename) 17 f = open(filename, 'w')
18 f.close()
19 19
20 def setUp(self): 20 def setUp(self):
21 self.tempdir = TESTFN+"_dir" 21 self.tempdir = TESTFN+"_dir"
22 self.mktemp('a', 'D') 22 self.mktemp('a', 'D')
23 self.mktemp('aab', 'F') 23 self.mktemp('aab', 'F')
24 self.mktemp('aaa', 'zzzF') 24 self.mktemp('aaa', 'zzzF')
25 self.mktemp('ZZZ') 25 self.mktemp('ZZZ')
26 self.mktemp('a', 'bcd', 'EF') 26 self.mktemp('a', 'bcd', 'EF')
27 self.mktemp('a', 'bcd', 'efg', 'ha') 27 self.mktemp('a', 'bcd', 'efg', 'ha')
28 if can_symlink(): 28 if can_symlink():
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 eq(self.glob('sym1'), [self.norm('sym1')]) 105 eq(self.glob('sym1'), [self.norm('sym1')])
106 eq(self.glob('sym2'), [self.norm('sym2')]) 106 eq(self.glob('sym2'), [self.norm('sym2')])
107 107
108 108
109 def test_main(): 109 def test_main():
110 run_unittest(GlobTests) 110 run_unittest(GlobTests)
111 111
112 112
113 if __name__ == "__main__": 113 if __name__ == "__main__":
114 test_main() 114 test_main()
OLDNEW
« no previous file with comments | « Lib/test/test_future5.py ('k') | Lib/test/test_http_cookiejar.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+