Skip to content

Commit 1beba4b

Browse files
committed
Attempt to create the defaults file outside of the data dir. Ref #29.
1 parent 0ab7feb commit 1beba4b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pytest_services/mysql.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212

1313

1414
@pytest.fixture(scope='session')
15-
def mysql_defaults_file(run_services, mysql_data_dir, memory_temp_dir):
15+
def mysql_defaults_file(
16+
run_services, tmp_path_factory, memory_temp_dir, request):
1617
"""MySQL defaults file."""
1718
if run_services:
18-
defaults_path = os.path.join(mysql_data_dir, 'defaults.cnf')
19+
cfg = tmp_path_factory.mktemp(request.session.name)
20+
defaults_path = str(cfg / 'defaults.cnf')
1921

2022
with open(defaults_path, 'w+') as fd:
2123
fd.write("""

0 commit comments

Comments
 (0)