MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / check

Method check

test/test_other.py:3891–3904  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

3889 create_file('data2.txt', 'data2')
3890
3891 def check(text):
3892 self.assertGreater(len(text), 0)
3893 empty_lines = 0
3894 # check the generated is relatively tidy
3895 for line in text.splitlines():
3896 if line and line[-1].isspace():
3897 self.fail('output contains trailing whitespace: `%s`' % line)
3898
3899 if line.strip():
3900 empty_lines = 0
3901 else:
3902 empty_lines += 1
3903 if empty_lines > 1:
3904 self.fail('output contains more then one empty line in row')
3905
3906 # relative path must be within/below the current dir
3907 self.assert_fail([FILE_PACKAGER, 'test.data', '--quiet', '--preload', '../data1.txt'], 'which is not contained within the current directory')

Callers 2

emcc.pyFile · 0.45
runner.pyFile · 0.45

Calls 4

failMethod · 0.95
run_processMethod · 0.80
assertContainedMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected