Skip to content

Commit

Permalink
fix: rename pwd to cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
simojo committed Nov 11, 2023
1 parent 72f0fb3 commit d3b90c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

- /_scratch/chasten/tests/test_filesystem.py - 16 matches
- /_scratch/chasten/tests/test_util.py - 5 matches
- /_scratch/chasten/tests/test_main.py - 18 matches
- /_scratch/chasten/tests/test_main.py - 19 matches
- /_scratch/chasten/tests/test_configuration.py - 3 matches
- /_scratch/chasten/tests/test_checks.py - 8 matches
- /_scratch/chasten/tests/test_validate.py - 4 matches
Expand Down
8 changes: 4 additions & 4 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ def test_cli_analyze_incorrect_arguments_correct_config(tmpdir):
assert "Cannot perform analysis due to configuration" in result.output


def test_cli_analyze_url_config(pwd):
def test_cli_analyze_url_config(cwd):
"""Confirm that using the command-line interface correctly handles a valid URL configuration."""
# get current git branch to use
git_directory = pwd / Path(".git") / Path("HEAD")
git_directory = cwd / Path(".git") / Path("HEAD")
branch = re.findall("(?:ref: refs/heads/).+", git_directory.read_text())[0]
# use current git branch to fetch config files from raw text repo files
config_url = f"https://raw.githubusercontent.com/AstuteSource/chasten/{branch}/.chasten/config_url_checks_file.yml"
Expand All @@ -272,7 +272,7 @@ def test_cli_analyze_url_config(pwd):
def test_cli_analyze_url_config_with_local_checks_file():
"""Confirm that using the command-line interface aborts execution when given a URL config that uses a local file path to specify checks files."""
# get current git branch to use
git_directory = pwd / Path(".git") / Path("HEAD")
git_directory = cwd / Path(".git") / Path("HEAD")
branch = re.findall("(?:ref: refs/heads/).+", git_directory.read_text())[0]
# use current git branch to fetch config files from raw text repo files
config_url = f"https://raw.githubusercontent.com/AstuteSource/chasten/{branch}/.chasten/config.yml"
Expand Down Expand Up @@ -337,7 +337,7 @@ def test_cli_analyze_local_config_with_url_and_filesystem_checks_files(cwd):
def test_cli_analyze_url_config_with_url_and_filesystem_checks_files():
"""Confirm that using the command-line interface aborts execution when given a URL config that references a combination of URL endpoints and local files for each checks file."""
# get current git branch to use
git_directory = pwd / Path(".git") / Path("HEAD")
git_directory = cwd / Path(".git") / Path("HEAD")
branch = re.findall("(?:ref: refs/heads/).+", git_directory.read_text())[0]
# use current git branch to fetch config files from raw text repo files
config_url = f"https://raw.githubusercontent.com/AstuteSource/chasten/{branch}/.chasten/config_url_and_local_checks_files.yml"
Expand Down

0 comments on commit d3b90c0

Please sign in to comment.