From 0c8393afd9fc09e82cd181325dfc910fd64f4bf9 Mon Sep 17 00:00:00 2001 From: Harry Date: Mon, 27 Jan 2025 23:51:13 +0000 Subject: [PATCH] seems like the tree hack is no longer necessary on mac --- chapter_08_prettification.asciidoc | 2 +- chapter_17_javascript.asciidoc | 2 +- tests/book_tester.py | 13 ------------- tests/test_chapter_08_prettification.py | 2 +- 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/chapter_08_prettification.asciidoc b/chapter_08_prettification.asciidoc index 5d8b5ba9b..32b49f01c 100644 --- a/chapter_08_prettification.asciidoc +++ b/chapter_08_prettification.asciidoc @@ -1062,7 +1062,7 @@ static/ ├── [...] └── bootstrap.min.js.map -16 directories, 171 files +17 directories, 171 files ---- `collectstatic` has also picked up all the CSS for the admin site. diff --git a/chapter_17_javascript.asciidoc b/chapter_17_javascript.asciidoc index f183cee2f..89e06720a 100644 --- a/chapter_17_javascript.asciidoc +++ b/chapter_17_javascript.asciidoc @@ -436,7 +436,7 @@ src/lists/static/tests ├── jasmine.js └── jasmine_favicon.png -2 directories, 9 files +3 directories, 9 files ---- We need to go edit the _SpecRunner.html_ file diff --git a/tests/book_tester.py b/tests/book_tester.py index 93066c01f..46de0ecf1 100644 --- a/tests/book_tester.py +++ b/tests/book_tester.py @@ -86,18 +86,6 @@ def standardise_assertionerror_none(output): return output.replace("AssertionError: None", "AssertionError") -def standardise_tree_dir_count(output): - regex = r"(\d+) directories, (\d+) files" - if sys.platform == "darwin": - if match := re.search(regex, output): - return re.sub( - regex, - f"{int(match.group(1)) -1} directories, {match.group(2)} files", - output, - ) - return output - - def standardise_git_init_msg(output): return output.replace( "Initialized empty Git repository", "Initialised empty Git repository" @@ -444,7 +432,6 @@ def assert_console_output_correct(self, actual, expected, ls=False): actual_fixed = fix_creating_database_line(actual_fixed) actual_fixed = fix_interactive_managepy_stuff(actual_fixed) actual_fixed = standardise_assertionerror_none(actual_fixed) - actual_fixed = standardise_tree_dir_count(actual_fixed) actual_fixed = standardise_git_init_msg(actual_fixed) actual_fixed = wrap_long_lines(actual_fixed) diff --git a/tests/test_chapter_08_prettification.py b/tests/test_chapter_08_prettification.py index bfb8b5f72..309191b48 100644 --- a/tests/test_chapter_08_prettification.py +++ b/tests/test_chapter_08_prettification.py @@ -32,7 +32,7 @@ def test_listings_and_commands_and_output(self): if os.environ.get("SKIP"): self.pos = 55 self.sourcetree.run_command( - "git switch {}".format(self.sourcetree.get_commit_spec("ch08l018")) + "git checkout {}".format(self.sourcetree.get_commit_spec("ch08l018")) ) while self.pos < len(self.listings):