Skip to content

Commit

Permalink
fixing a weird typo
Browse files Browse the repository at this point in the history
  • Loading branch information
markmark206 committed Apr 13, 2022
1 parent d8bb747 commit 6c679a6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is a package for producing indented, human-friendly, easy to understand log

Example:

Executing `count_barnyard_animinals()` in this code example:
Executing `count_barnyard_animals()` in this code example:

```python
from log_indented import logged, log_info
Expand Down Expand Up @@ -37,7 +37,7 @@ def count_sheep() -> int:


@logged(logger)
def count_barnyard_animinals() -> int:
def count_barnyard_animals() -> int:
total_animal_count: int = count_birds() + count_goats() + count_sheep()
log_info(f"total barnyard animals: {total_animal_count}")
return total_animal_count
Expand All @@ -46,7 +46,7 @@ def count_barnyard_animinals() -> int:
will produce output similar to this:

```
+ count_barnyard_animinals: enter
+ count_barnyard_animals: enter
+ count_birds: enter
+ count_chicken: enter
- count_chicken: exit. took 0.00 ms.
Expand All @@ -57,6 +57,6 @@ will produce output similar to this:
- count_goats: exit. took 0.00 ms.
+ count_sheep: enter
- count_sheep: exit. took 0.00 ms.
count_barnyard_animinals: total barnyard animals: 17
- count_barnyard_animinals: exit. took 0.18 ms.
count_barnyard_animals: total barnyard animals: 17
- count_barnyard_animals: exit. took 0.18 ms.
```
10 changes: 5 additions & 5 deletions src/log_indented/log_indented_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def count_sheep() -> int:


@logged(logger)
def count_barnyard_animinals() -> int:
def count_barnyard_animals() -> int:
total_animal_count: int = count_birds() + count_goats() + count_sheep()
log_info(f"total barnyard animals: {total_animal_count}")
return total_animal_count
Expand Down Expand Up @@ -110,11 +110,11 @@ def test_basic(self) -> None:
@logged(logger)
def test_count_animals(self) -> None:
with self.assertLogs() as captured:
animal_count: int = count_barnyard_animinals()
animal_count: int = count_barnyard_animals()
self.assertEqual(animal_count, 17)
self._validate_captured_logs(
expected_lines=[
" + count_barnyard_animinals: enter",
" + count_barnyard_animals: enter",
" + count_birds: enter",
" + count_chicken: enter",
" - count_chicken: exit. took ",
Expand All @@ -125,8 +125,8 @@ def test_count_animals(self) -> None:
" - count_goats: exit. took ",
" + count_sheep: enter",
" - count_sheep: exit. took ",
" count_barnyard_animinals: total barnyard animals: 17",
" - count_barnyard_animinals: exit. took ",
" count_barnyard_animals: total barnyard animals: 17",
" - count_barnyard_animals: exit. took ",
],
captured=captured,
)
Expand Down

0 comments on commit 6c679a6

Please sign in to comment.