Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace path.py with 2-line helper function #329

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
'begins',
'jsonschema',
'lxml',
'path.py',
'pyquery',
'pyxform',
'statistics',
Expand Down
11 changes: 10 additions & 1 deletion tests/test_exports.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,7 +13,6 @@

import openpyxl
import pytest
from path import TempDir

from formpack import FormPack
from formpack.constants import UNTRANSLATED
Expand All @@ -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

Expand Down
Loading