Skip to content

Commit

Permalink
added a :param docstring to src/krux/format.py
Browse files Browse the repository at this point in the history
added a docstring to tests/test_format.py
  • Loading branch information
qlrd committed Jan 7, 2024
1 parent 82ad974 commit 7f6cc74
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/krux/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@


def format_btc(amount):
"""Formats a BTC value according to the locale and
"""
Formats a BTC value according to the locale and
the International Bureau of Weights and Measures,
while still using the idea behind the Satcomma standard
:param amount: int
"""

btc_without_decimal = amount // SATS_PER_BTC
Expand Down
7 changes: 7 additions & 0 deletions tests/test_format.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# pylint: disable=unused-argument
def test_format_btc(m5stickv):
"""
Test many cases where the format of a BTC value
can be shown on device according :function:`krux.format.format_btc`
:param m5stickv: the device
"""
from krux.format import format_btc

cases = [
Expand Down

0 comments on commit 7f6cc74

Please sign in to comment.