Migration from GitHub

This commit is contained in:
rarmknecht
2025-12-19 17:28:06 -06:00
commit 1ee09f6d02
5 changed files with 494 additions and 0 deletions

29
test_basic.py Normal file
View File

@@ -0,0 +1,29 @@
# import sys, os
# sys.path.insert(0, os.path.dirname(__file__))
from basic_info import *
file_location = 'samples/gatheringstorm_ch1.txt'
(text, sentences) = massage_raw(get_raw(file_location))
res = flesch_kincaid(text,sentences)
def test_massage_raw_text_exists():
assert text != None
def test_massage_raw_sent_exists():
assert sentences != None
def test_massage_raw_text_length():
assert len(text) == 3740
def test_massage_raw_sent_length():
assert len(sentences) == 618
def test_words():
assert res['words'] == 3712
def test_grade_level():
assert round(res['grade_level'], 2) == 5.37
def test_reading_ease():
assert round(res['reading_ease'], 2) == 67.25