File: test_pathlib.py

package info (click to toggle)
pytest-datadir 1.3.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 184 kB
  • sloc: python: 138; makefile: 8; sh: 6
file content (11 lines) | stat: -rw-r--r-- 363 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
import sys
import pytest

@pytest.mark.skipif(sys.version_info[0] == 3, reason='Python 2 only')
def test_correct_pathlib(datadir):
    """
    Dummy test that we are using the correct backport of Python 3's
    standard pathlib in Python 2.
    """
    (datadir / 'foo').mkdir(parents=True, exist_ok=True)
    (datadir / 'foo').mkdir(parents=True, exist_ok=True)