MCPcopy Create free account
hub / github.com/Distrotech/reportlab / test1

Method test1

tests/test_pyfiles.py:126–140  ·  view source on GitHub ↗

Test if all Python files have a Unix-like first line.

(self)

Source from the content-addressed store, hash-verified

124 return paths
125
126 def test1(self):
127 "Test if all Python files have a Unix-like first line."
128
129 path = outputfile("test_firstline.log")
130 file = open(path, 'w')
131 file.write('No Unix-like first line found in the files below.\n\n')
132
133 from reportlab.lib.testutils import RL_HOME
134 paths = self.findSuspiciousModules(RL_HOME, 'reportlab')
135 paths.sort()
136
137 for p in paths:
138 file.write("%s\n" % p)
139
140 file.close()
141
142def makeSuite():
143 suite = makeSuiteForClasses(SelfTestCase, AsciiFileTestCase, FilenameTestCase)

Callers

nothing calls this directly

Calls 5

findSuspiciousModulesMethod · 0.95
outputfileFunction · 0.90
writeMethod · 0.45
sortMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected