File: support.py

package info (click to toggle)
python-ofxparse 0.15%2Bgit20161013-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 724 kB
  • ctags: 223
  • sloc: python: 3,042; makefile: 5
file content (9 lines) | stat: -rw-r--r-- 225 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
import os


def open_file(filename):
    ''' Load a file from the fixtures directory. '''
    path = 'fixtures/' + filename
    if ('tests' in os.listdir('.')):
        path = 'tests/' + path
    return open(path, mode='rb')