Skip to content

Commit 5eef8fd

Browse files
committed
Use tmp_path fixture instead of tmpdir
1 parent b3e34af commit 5eef8fd

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/test_cli.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,25 +64,25 @@ def all_cmd_plates(request, dir_isnap):
6464

6565
def helper_test_cli(all_cmd, tmp):
6666
subprocess.run(all_cmd[0] + ' -n={}/stagpy'.format(tmp), shell=True)
67-
produced_files = tmp.listdir(sort=True)
67+
produced_files = sorted(tmp.iterdir())
6868
expected_files = [tmp / expfile for expfile in sorted(all_cmd[1])]
6969
assert produced_files == expected_files
7070

7171

72-
def test_field_cli(all_cmd_field, tmpdir):
73-
helper_test_cli(all_cmd_field, tmpdir)
72+
def test_field_cli(all_cmd_field, tmp_path):
73+
helper_test_cli(all_cmd_field, tmp_path)
7474

7575

76-
def test_rprof_cli(all_cmd_rprof, tmpdir):
77-
helper_test_cli(all_cmd_rprof, tmpdir)
76+
def test_rprof_cli(all_cmd_rprof, tmp_path):
77+
helper_test_cli(all_cmd_rprof, tmp_path)
7878

7979

80-
def test_time_cli(all_cmd_time, tmpdir):
81-
helper_test_cli(all_cmd_time, tmpdir)
80+
def test_time_cli(all_cmd_time, tmp_path):
81+
helper_test_cli(all_cmd_time, tmp_path)
8282

8383

84-
def test_plates_cli(all_cmd_plates, tmpdir):
85-
helper_test_cli(all_cmd_plates, tmpdir)
84+
def test_plates_cli(all_cmd_plates, tmp_path):
85+
helper_test_cli(all_cmd_plates, tmp_path)
8686

8787

8888
def test_err_cli():

0 commit comments

Comments
 (0)