Skip to content

Commit

Permalink
Remove inadvertent reliance on config data from CPython. Closes #70.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Feb 24, 2024
1 parent 7b1c6cf commit be38ce0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import contextlib
import sys
import types
import pathlib


def check__all__(*args, **kwargs):
Expand All @@ -19,3 +20,13 @@ def check__all__(*args, **kwargs):
except ImportError: # pragma: no cover
# Python 3.9
import test.support as os_helper # noqa: F401


def find_file(filename, subdir=None):
"""
Replacement for support.findfile to find the files locally.
"""
return str(pathlib.Path('tests') / filename)


support.findfile = find_file

0 comments on commit be38ce0

Please sign in to comment.