diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2011-04-26 12:14:52 +0200 |
|---|---|---|
| committer | Jelmer Vernooij <jelmer@samba.org> | 2011-04-26 12:14:52 +0200 |
| commit | fac837618f84531205f6491fb9d72bde8717fbb8 (patch) | |
| tree | 367d4343dfef6f37ce37aba61477e0ff2e80e4c8 /python/subunit/__init__.py | |
| parent | 32b4cbe9c436a63ca330b30bbe41566d6335e637 (diff) | |
| parent | 7ce9deb0fe988b194c577b778b722f079a272d74 (diff) | |
| download | subunit-git-fac837618f84531205f6491fb9d72bde8717fbb8.tar.gz | |
Merge addition of --fixup-expected-failures argument to filter-subunit.
Diffstat (limited to 'python/subunit/__init__.py')
| -rw-r--r-- | python/subunit/__init__.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py index 9dc849a..368d3b2 100644 --- a/python/subunit/__init__.py +++ b/python/subunit/__init__.py @@ -1132,6 +1132,19 @@ def get_default_formatter(): return sys.stdout +def read_test_list(path): + """Read a list of test ids from a file on disk. + + :param path: Path to the file + :return: Sequence of test ids + """ + f = open(path, 'rb') + try: + return [l.rstrip("\n") for l in f.readlines()] + finally: + f.close() + + def _make_stream_binary(stream): """Ensure that a stream will be binary safe. See _make_binary_on_windows.""" if getattr(stream, 'fileno', None) is not None: |
