MCPcopy
hub / github.com/eudicots/Cactus / assertFileExists

Method assertFileExists

cactus/tests/__init__.py:27–39  ·  view source on GitHub ↗

Check that a file at path exists.

(self, path)

Source from the content-addressed store, hash-verified

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 """

Callers 8

test_existing_symlinkMethod · 0.80
test_ignore_staticMethod · 0.80
test_ignore_pagesMethod · 0.80
test_build_pageMethod · 0.80
test_ignore_non_htmlMethod · 0.80

Calls 1

formatMethod · 0.80

Tested by 8

test_existing_symlinkMethod · 0.64
test_ignore_staticMethod · 0.64
test_ignore_pagesMethod · 0.64
test_build_pageMethod · 0.64
test_ignore_non_htmlMethod · 0.64