Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Aug 23, 2024
1 parent f5e2a0c commit 56e0035
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
13 changes: 6 additions & 7 deletions src/towncrier/test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ def test_title_format_custom_markdown(self, runner):
[20-01-2001] CUSTOM RELEASE for FooBarBaz version 7.8.9
### Features
## Features
- Adds levitation (#123)
Expand Down Expand Up @@ -1136,11 +1136,10 @@ def test_markdown_injected_after_header(self, runner):
)

default_template = read_pkg_resource("templates/default.md")
assert "##{%" in default_template
write(
"custom_template.md",
contents=default_template.replace(
"### {{ definitions", "#### {{ definitions"
),
contents=default_template.replace("##{%", "####{%"),
)

result = runner.invoke(_main, ["--date", "01-01-2001"], catch_exceptions=False)
Expand Down Expand Up @@ -1387,7 +1386,7 @@ def test_default_start_string_markdown(self, runner):
# Foo 1.2.3 (01-01-2001)
### Features
## Features
- Adds levitation (#123)
Expand Down Expand Up @@ -1437,7 +1436,7 @@ def test_markdown_no_name_title(self, runner):
# 1.2.3 (01-01-2001)
### Features
## Features
- Adds levitation (#123)
"""
Expand Down Expand Up @@ -1607,7 +1606,7 @@ def test_orphans_in_non_showcontent_markdown(self, runner):
# 7.8.9 (20-01-2001)
### Misc
## Misc
- #123, #345
- Another orphan misc still displayed!
Expand Down
8 changes: 4 additions & 4 deletions src/towncrier/test/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,15 @@ def test_markdown(self):

expected_output = """# MyProject 1.0 (never)
### Features
## Features
- Fun! (baz)
- Foo added. (#2, #9, #72)
- Multi-line
here (#3)
- Stuff! (#4)
### Misc
## Misc
- bar, #1, #9, #142
Expand Down Expand Up @@ -254,7 +254,7 @@ def test_markdown(self):
# Also test with custom issue format
expected_output = """# MyProject 1.0 (never)
### Features
## Features
- Fun! ([baz])
- Foo added. ([2], [9], [72])
Expand All @@ -269,7 +269,7 @@ def test_markdown(self):
[9]: https://github.com/twisted/towncrier/issues/9
[72]: https://github.com/twisted/towncrier/issues/72
### Misc
## Misc
- [bar], [1], [9], [142]
Expand Down

0 comments on commit 56e0035

Please sign in to comment.