File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 3131# stdlib
3232import datetime
3333import itertools
34+ import os
3435import random
3536import sys
3637from functools import lru_cache
@@ -391,6 +392,12 @@ def my_test(tmp_pathplus: PathPlus):
391392 return PathPlus (tmp_path )
392393
393394
395+ @pytest .fixture ()
396+ def original_datadir (request ) -> Path :
397+ # Work around pycharm confusing datadir with test file.
398+ return Path (os .path .splitext (request .module .__file__ )[0 ] + '_' )
399+
400+
394401def pytest_report_header (config , startdir ):
395402 """
396403 Prints the start time of the pytest session.
Original file line number Diff line number Diff line change 1- # stdlib
2- import os
3- from pathlib import Path
4-
5- # 3rd party
6- import pytest
7-
81pytest_plugins = ("domdf_python_tools.testing" , )
9-
10-
11- @pytest .fixture ()
12- def original_datadir (request ) -> Path :
13- # Work around pycharm confusing datadir with test file.
14- return Path (os .path .splitext (request .module .__file__ )[0 ] + '_' )
You can’t perform that action at this time.
0 commit comments