From d3b90c038f724b666d39adc859e6ccdbdc919a78 Mon Sep 17 00:00:00 2001 From: Simon Jones Date: Sat, 11 Nov 2023 15:49:43 -0500 Subject: [PATCH] fix: rename pwd to cwd --- analysis.md | 2 +- tests/test_main.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/analysis.md b/analysis.md index 19d06709..b2d1fb15 100644 --- a/analysis.md +++ b/analysis.md @@ -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 diff --git a/tests/test_main.py b/tests/test_main.py index 4c8e7978..cb99e95f 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -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" @@ -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" @@ -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"