File: utils.py

package info (click to toggle)
python-pyflume 0.8.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 332 kB
  • sloc: python: 857; makefile: 6
file content (18 lines) | stat: -rw-r--r-- 334 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""Utils to support Flume tests."""

import os


def load_fixture(filename):
    """Load a fixture.

    Args:
        filename: File to load fixture.

    Returns:
        File fixture contents.

    """
    path = os.path.join(os.path.dirname(__file__), "fixtures", filename)
    with open(path) as fptr:
        return fptr.read()