Skip to content

Commit

Permalink
Merge pull request #329 from kobotoolbox/remove-path.py-dependency
Browse files Browse the repository at this point in the history
Replace path.py with 2-line helper function
  • Loading branch information
jnm authored Jan 22, 2025
2 parents 894d285 + 93f65d8 commit 7b77ead
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
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

0 comments on commit 7b77ead

Please sign in to comment.