python 3.9 compat

This commit is contained in:
sneakers-the-rat 2024-09-25 17:11:02 -07:00
parent 1f9e3ea481
commit ea2d1238ed
Signed by untrusted user who does not match committer: jonny
GPG key ID: 6DCB96EF1E4D232D

View file

@ -82,9 +82,8 @@ def test_relative_to_root_dir():
beneath the root directory (eg `/data`) even if they exist
"""
# try:
this_file = Path(__file__).resolve()
test_path = this_file.parents[-2]
# python 3.9 compat, which can't use negative indices
test_path = [p for p in Path(__file__).resolve().parents][-2]
test_data = {"some_field": str(test_path)}