File: test_base.py

package info (click to toggle)
ledgerhelpers 0.3.10-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 616 kB
  • sloc: python: 3,783; makefile: 18
file content (17 lines) | stat: -rw-r--r-- 331 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import codecs
import os

import ledgerhelpers as m


if os.getenv('LEDGERHELPERS_TEST_DEBUG'):
    m.enable_debugging(True)


def datapath(filename):
    return os.path.join(os.path.dirname(__file__), "testdata", filename)


def data(filename):
    with codecs.open(datapath(filename), "rb", "utf-8") as f:
        return f.read()