source:
trunk/essentials/dev-lang/python/Lib/test/test_glob.py@
3226
| Last change on this file since 3226 was 3225, checked in by , 19 years ago | |
|---|---|
| File size: 3.6 KB | |
| Line | |
|---|---|
| 1 | import unittest |
| 2 | from test.test_support import run_unittest, TESTFN |
| 3 | import glob |
| 4 | import os |
| 5 | import shutil |
| 6 | |
| 7 | class GlobTests(unittest.TestCase): |
| 8 | |
| 9 | def norm(self, *parts): |
| 10 | return os.path.normpath(os.path.join(self.tempdir, *parts)) |
| 11 | |
| 12 | def mktemp(self, *parts): |
| 13 | filename = self.norm(*parts) |
| 14 | base, file = os.path.split(filename) |
| 15 | if not os.path.exists(base): |
| 16 | os.makedirs(base) |
| 17 | f = open(filename, 'w') |
| 18 | f.close() |
| 19 | |
| 20 | def setUp(self): |
| 21 | self.tempdir = TESTFN+"_dir" |
