File: common.py

package info (click to toggle)
python-tado 0.19.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 720 kB
  • sloc: python: 2,671; sh: 29; makefile: 3
file content (10 lines) | stat: -rw-r--r-- 234 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
"""Common utils for tests."""

import os


def load_fixture(filename: str) -> str:
    """Load a fixture."""
    path = os.path.join(os.path.dirname(__file__), "fixtures", filename)
    with open(path) as fd:
        return fd.read()