Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
obar1 committed Sep 7, 2024
1 parent c13d163 commit d752379
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
2 changes: 2 additions & 0 deletions zero_to_one_hundred/configs/a_config_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,7 @@ def get_legend_type(self) -> str | None:
def get_legend_icons_as_md(self):
icons = self.get_legend_icons
res = [f"`{i.name}` {i.icon}" for i in icons]
if res is []:
return ""
return "**legend_icons**\n" + "\n".join(res)

16 changes: 3 additions & 13 deletions zero_to_one_hundred/tests/test_ztoh/test_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ def test_asMarkDown(
expected = """
# map toc.md, 2
## legend:
| footprints | completed |
|---|---|
| `wip` | `done` |
**legend_icons**
1.[`here`](./0to100/https§§§cloud.google.com§zzz/readme.md) `wip`
1.[`here`](./0to100/https§§§cloud.google.com§abc/readme.md) `wip`
"""
Expand All @@ -55,10 +51,7 @@ def test_asMarkDown_0(
expected = """
# map toc.md, 3
## legend:
| footprints | completed |
|---|---|
| `wip` | `done` |
**legend_icons**
1.[`here`](./0to100/https§§§cloud.google.com§abc/readme.md) `wip`
1.[`here`](./0to100/https§§§cloud.google.com§efg/readme.md) `wip`
Expand Down Expand Up @@ -87,10 +80,7 @@ def test_asMarkDown_1(
expected = """
# map toc.md, 3
## legend:
| footprints | completed |
|---|---|
| `wip` | `done` |
**legend_icons**
1.[`here`](./0to100/https§§§cloud.google.com§abc/readme.md) `wip`
1.[`here`](./0to100/https§§§cloud.google.com§zzz/readme.md) `wip`
Expand Down
5 changes: 3 additions & 2 deletions zero_to_one_hundred/tests/test_ztoh/test_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pyfakefs.fake_filesystem_unittest import Patcher

from zero_to_one_hundred.models.section import Section
from zero_to_one_hundred.tests.conftest import str_relaxed


def test_init(get_config_map, persist_fs, process_fs, http_url_1):
Expand Down Expand Up @@ -96,6 +97,6 @@ def test_asMarkDown(get_config_map, persist_fs, process_fs, http_url_1):
actual = Section(get_config_map, persist_fs, process_fs, http_url_1)
current = actual.asMarkDown()
assert (
current
== "1. [`here`](./0to100/https§§§cloud.google.com§abc/readme.md) `wip`"
str_relaxed(current)
== str_relaxed("1. [`here`](./0to100/https§§§cloud.google.com§abc/readme.md) `wip`")
)

0 comments on commit d752379

Please sign in to comment.