Check that a file at path exists.
(self, path)
| 25 | django.conf.settings._wrapped = django.conf.empty |
| 26 | |
| 27 | def assertFileExists(self, path): |
| 28 | """ |
| 29 | Check that a file at path exists. |
| 30 | """ |
| 31 | try: |
| 32 | open(path) |
| 33 | except IOError: |
| 34 | path_dir = os.path.dirname(path) |
| 35 | msg = [ |
| 36 | "File does not exist: {0}".format(path), |
| 37 | "The following files *did* exist in {0}: {1}".format(path_dir, os.listdir(path_dir)) |
| 38 | ] |
| 39 | self.fail("\n".join(msg)) |
| 40 | |
| 41 | def assertFileDoesNotExist(self, path): |
| 42 | """ |