Skip to content

Commit

Permalink
seems like the tree hack is no longer necessary on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
hjwp committed Jan 27, 2025
1 parent d932720 commit 0c8393a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion chapter_08_prettification.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion chapter_17_javascript.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions tests/book_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_chapter_08_prettification.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 0c8393a

Please sign in to comment.