@@ -16,7 +16,7 @@ class LoadYAMLFn(t.Protocol):
1616 def __call__ (
1717 self ,
1818 content : str ,
19- dir : str = "randomdir" ,
19+ path : str = "randomdir" ,
2020 filename : str = "randomfilename.yaml" ,
2121 ) -> tuple [pathlib .Path , list [t .Union [t .Any , pathlib .Path ]], list ["ConfigDict" ]]:
2222 """Callable function type signature for load_yaml pytest fixture."""
@@ -28,10 +28,10 @@ def load_yaml(tmp_path: pathlib.Path) -> LoadYAMLFn:
2828 """Return a yaml loading function that uses temporary directory path."""
2929
3030 def fn (
31- content : str , dir : str = "randomdir" , filename : str = "randomfilename.yaml"
31+ content : str , path : str = "randomdir" , filename : str = "randomfilename.yaml"
3232 ) -> tuple [pathlib .Path , list [pathlib .Path ], list ["ConfigDict" ]]:
3333 """Return vcspull configurations and write out config to temp directory."""
34- _dir = tmp_path / dir
34+ _dir = tmp_path / path
3535 _dir .mkdir ()
3636 _config = _dir / filename
3737 _config .write_text (content , encoding = "utf-8" )
@@ -45,7 +45,7 @@ def fn(
4545
4646def test_simple_format (load_yaml : LoadYAMLFn ) -> None :
4747 """Test simple configuration YAML file for vcspull."""
48- dir , _ , repos = load_yaml (
48+ path , _ , repos = load_yaml (
4949 """
5050vcspull:
5151 libvcs: git+https://github.com/vcs-python/libvcs
@@ -55,24 +55,24 @@ def test_simple_format(load_yaml: LoadYAMLFn) -> None:
5555 assert len (repos ) == 1
5656 repo = repos [0 ]
5757
58- assert dir / "vcspull" == repo ["dir " ].parent
59- assert dir / "vcspull" / "libvcs" == repo ["dir " ]
58+ assert path / "vcspull" == repo ["path " ].parent
59+ assert path / "vcspull" / "libvcs" == repo ["path " ]
6060
6161
6262def test_relative_dir (load_yaml : LoadYAMLFn ) -> None :
6363 """Test configuration files for vcspull support relative directories."""
64- dir , _ , repos = load_yaml (
64+ path , _ , repos = load_yaml (
6565 """
6666./relativedir:
6767 docutils: svn+http://svn.code.sf.net/p/docutils/code/trunk
6868 """
6969 )
7070
71- config_files = config .find_config_files (path = dir )
72- repos = config .load_configs (config_files , dir )
71+ config_files = config .find_config_files (path = path )
72+ repos = config .load_configs (config_files , path )
7373
7474 assert len (repos ) == 1
7575 repo = repos [0 ]
7676
77- assert dir / "relativedir" == repo ["dir " ].parent
78- assert dir / "relativedir" / "docutils" == repo ["dir " ]
77+ assert path / "relativedir" == repo ["path " ].parent
78+ assert path / "relativedir" / "docutils" == repo ["path " ]
0 commit comments