Leave zero-byte languages out of the stats chart
This commit is contained in:
1 parent
73d2a83250
commit
9f76bf6c41
2 files changed
+14
-1
No files matched your search
@@ -193,6 +193,17 @@ def test_markdown_percentages_are_rounded_to_one_decimal():
|
||||
)
|
||||
|
||||
|
||||
def test_markdown_leaves_out_languages_with_zero_bytes():
|
||||
# e.g. every HTML byte came from excluded files
|
||||
assert generate_markdown({"Python": 750, "JavaScript": 250, "HTML": 0}) == (
|
||||
"## 📊 Languages\n"
|
||||
+ "█" * 37
|
||||
+ " Python 75.0%\\\n"
|
||||
+ "█" * 12
|
||||
+ " JavaScript 25.0%"
|
||||
)
|
||||
|
||||
|
||||
def test_markdown_is_empty_when_there_are_no_languages():
|
||||
assert generate_markdown({}) == ""
|
||||
|
||||
|
||||
Reference in new issue
Block a user