summaryrefslogtreecommitdiff
path: root/tests/support.py
blob: fe381f5db7941098a6dc1a2d2e6b92d721bb27b9 (plain)
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')