| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/env python |
| 2 | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 6 | 5 |
| 7 """Tests for pyauto_utils.""" | 6 """Tests for pyauto_utils.""" |
| 8 | 7 |
| 9 import glob | 8 import glob |
| 10 import os | 9 import os |
| 11 import shutil | 10 import shutil |
| 12 import tempfile | 11 import tempfile |
| 13 import unittest | 12 import unittest |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 r = pyauto_utils.ExistingPathReplacer(mydir) | 77 r = pyauto_utils.ExistingPathReplacer(mydir) |
| 79 self.assertEqual(2, len(os.listdir(self._workdir))) | 78 self.assertEqual(2, len(os.listdir(self._workdir))) |
| 80 self.assertFalse(os.path.isfile(myfile)) | 79 self.assertFalse(os.path.isfile(myfile)) |
| 81 del r | 80 del r |
| 82 self.assertEqual(1, len(os.listdir(self._workdir))) | 81 self.assertEqual(1, len(os.listdir(self._workdir))) |
| 83 self.assertTrue(os.path.isfile(myfile)) | 82 self.assertTrue(os.path.isfile(myfile)) |
| 84 | 83 |
| 85 | 84 |
| 86 if __name__ == '__main__': | 85 if __name__ == '__main__': |
| 87 unittest.main() | 86 unittest.main() |
| OLD | NEW |