Skip to content

Commit

Permalink
add some details about refactor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mndeveci committed Nov 7, 2023
1 parent 3e8be94 commit 9510da3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/refactor/test_compare_folders.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Runs `sam init` for old folder and new folder and then compares these folders to assert their contents are the same.
These tests are created to make sure we are not introducing a side effect with this refactoring (merge same programming language templates into single folder)
"""
from logging import INFO, StreamHandler, getLogger
from pathlib import Path
import shutil
Expand Down Expand Up @@ -38,10 +42,11 @@ def test_compare_folders(self, old_folder, new_folder, runtime):
self.old_template_path = Path(REPO_ROOT, old_folder)
self.new_template_path = Path(REPO_ROOT, new_folder)

LOG.info("Running `sam init` for old folder (%s) and new folder (%s)", old_folder, new_folder)
self._run_init(self.old_template_path, Path(self.old_cwd.name))
self._run_init(self.new_template_path, Path(self.new_cwd.name), runtime)

LOG.info("Comparing %s folder with %s folder and %s runtime", old_folder, new_folder, runtime)
LOG.info("Comparing generated application for old folder (%s) with new folder (%s) and runtime (%s)", old_folder, new_folder, runtime)
diff_result = run_command([
"diff",
"-rs",
Expand Down

0 comments on commit 9510da3

Please sign in to comment.