TEST: Expect failure on Python < 3.6
+import sys
import os
import pytest
import bids
@@ -222,6 +223,7 @@ def test_bidsfile_get_entities(layout_synthetic):
assert set(md.keys()) == md_ents | file_ents
+@pytest.mark.xfail(sys.version_info < (3, 6), reason="os.PathLike introduced in Python 3.6")
def test_bidsfile_fspath(sample_bidsfile):
bf = sample_bidsfile
bf_path = Path(bf)
