18 lines
470 B
Python
18 lines
470 B
Python
from novel_stats import novel_stats as module
|
|
|
|
|
|
def test_count_words_tallies_basic_sentence():
|
|
assert module.count_words('This sentence is five words.') == 5
|
|
|
|
|
|
def test_count_words_em_dash_does_not_split_words():
|
|
assert module.count_words('This is only six—or is it?') == 6
|
|
|
|
|
|
def test_count_words_skips_chapter_marker():
|
|
assert module.count_words('## Chapter 1') == 2
|
|
|
|
|
|
def test_count_words_skips_scene_break():
|
|
assert module.count_words('* * *') == 0
|