(text)
| 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') |
no test coverage detected