From 5f4c0c37be75760ff35d5d9fe470b78c77f555ff Mon Sep 17 00:00:00 2001 From: Robert Paton Date: Sun, 11 Aug 2019 19:51:59 -0600 Subject: [PATCH] add conftest.py --- tests/conftest.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/conftest.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..5bcab93 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import os +import pytest + +try: + import pyqrc + BASEPATH = os.path.join(pyqrc.__path__[0]) +except ImportError: + here = os.path.dirname(os.path.abspath(__file__)) + BASEPATH = os.path.normpath(os.path.join(here, '..', 'pyqrc')) + + +def datapath(path): + return os.path.join(BASEPATH, 'examples', path)