11"""Tests for placing config dicts into :py:class:`Project` objects."""
2- from _pytest . compat import LEGACY_PATH
2+ import pathlib
33
44from libvcs import BaseSync , GitSync , HgSync , SvnSync
55from libvcs ._internal .shortcuts import create_project
@@ -54,7 +54,7 @@ def test_to_dictlist():
5454 assert "url" == remote
5555
5656
57- def test_vcs_url_scheme_to_object (tmpdir : LEGACY_PATH ):
57+ def test_vcs_url_scheme_to_object (tmp_path : pathlib . Path ):
5858 """Verify `url` return {Git,Mercurial,Subversion}Project.
5959
6060 :class:`GitSync`, :class:`HgSync` or :class:`SvnSync`
@@ -64,7 +64,7 @@ def test_vcs_url_scheme_to_object(tmpdir: LEGACY_PATH):
6464 git_repo = create_project (
6565 vcs = "git" ,
6666 url = "git+git://git.myproject.org/MyProject.git@da39a3ee5e6b4b" ,
67- dir = str (tmpdir . join ( "myproject1" ) ),
67+ dir = str (tmp_path / "myproject1" ),
6868 )
6969
7070 # TODO cwd and name if duplicated should give an error
@@ -75,7 +75,7 @@ def test_vcs_url_scheme_to_object(tmpdir: LEGACY_PATH):
7575 hg_repo = create_project (
7676 vcs = "hg" ,
7777 url = "hg+https://hg.myproject.org/MyProject#egg=MyProject" ,
78- dir = str (tmpdir . join ( "myproject2" ) ),
78+ dir = str (tmp_path / "myproject2" ),
7979 )
8080
8181 assert isinstance (hg_repo , HgSync )
@@ -84,14 +84,14 @@ def test_vcs_url_scheme_to_object(tmpdir: LEGACY_PATH):
8484 svn_repo = create_project (
8585 vcs = "svn" ,
8686 url = "svn+svn://svn.myproject.org/svn/MyProject#egg=MyProject" ,
87- dir = str (tmpdir . join ( "myproject3" ) ),
87+ dir = str (tmp_path / "myproject3" ),
8888 )
8989
9090 assert isinstance (svn_repo , SvnSync )
9191 assert isinstance (svn_repo , BaseSync )
9292
9393
94- def test_to_repo_objects (tmpdir : LEGACY_PATH ):
94+ def test_to_repo_objects (tmp_path : pathlib . Path ):
9595 """:py:obj:`dict` objects into Project objects."""
9696 repo_list = filter_repos (fixtures .config_dict_expanded )
9797 for repo_dict in repo_list :
0 commit comments