diff --git a/setup.py b/setup.py index cf08a40..8423bb5 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,6 @@ 'begins', 'jsonschema', 'lxml', - 'path.py', 'pyquery', 'pyxform', 'statistics', diff --git a/tests/test_exports.py b/tests/test_exports.py index 1846810..05797e0 100644 --- a/tests/test_exports.py +++ b/tests/test_exports.py @@ -1,6 +1,9 @@ # coding: utf-8 +import contextlib import io import json +import pathlib +import tempfile import unittest from collections import OrderedDict from dateutil import parser @@ -10,7 +13,6 @@ import openpyxl import pytest -from path import TempDir from formpack import FormPack from formpack.constants import UNTRANSLATED @@ -26,6 +28,13 @@ restaurant_profile = build_fixture('restaurant_profile') +@contextlib.contextmanager +def TempDir(): + """ A small helper to avoid needing the entire path.py library """ + with tempfile.TemporaryDirectory() as d: + yield pathlib.Path(d) + + class TestFormPackExport(unittest.TestCase): maxDiff = None