forked from mrlan/EnglishPal
62 lines
6.0 KiB
Plaintext
62 lines
6.0 KiB
Plaintext
"C:\Users\Kq Aseri\Desktop\package\软件项目管理\EnglishPal\EnglishPal\.venv\Scripts\python.exe" "G:/PyCharm 2024.3.1.1/plugins/python-ce/helpers/pycharm/_jb_pytest_runner.py" --path "C:\Users\Kq Aseri\Desktop\package\软件项目管理\EnglishPal\EnglishPal\app\test_vocabulary.py"
|
|
Testing started at 上午12:51 ...
|
|
Launching pytest with arguments C:\Users\Kq Aseri\Desktop\package\软件项目管理\EnglishPal\EnglishPal\app\test_vocabulary.py --no-header --no-summary -q in C:\Users\Kq Aseri\Desktop\package\软件项目管理\EnglishPal\EnglishPal\app
|
|
|
|
============================= test session starts =============================
|
|
collecting ... collected 16 items
|
|
|
|
test_vocabulary.py::test_article_level_empty_content PASSED [ 6%]
|
|
test_vocabulary.py::test_article_level_punctuation_only PASSED [ 12%]
|
|
test_vocabulary.py::test_article_level_digit_only PASSED [ 18%]
|
|
test_vocabulary.py::test_article_level_single_word PASSED [ 25%]
|
|
test_vocabulary.py::test_article_level_subset_vs_superset PASSED [ 31%]
|
|
test_vocabulary.py::test_article_level_multiple_words PASSED [ 37%]
|
|
test_vocabulary.py::test_article_level_short_paragraph PASSED [ 43%]
|
|
test_vocabulary.py::test_article_level_medium_paragraph PASSED [ 50%]
|
|
test_vocabulary.py::test_article_level_long_paragraph FAILED [ 56%]
|
|
test_vocabulary.py:49 (test_article_level_long_paragraph)
|
|
6 != 5
|
|
|
|
Expected :5
|
|
Actual :6
|
|
<Click to see difference>
|
|
|
|
def test_article_level_long_paragraph():
|
|
''' Boundary case test '''
|
|
article = ArticleVocabularyLevel('These several facts accord well with my theory. I believe in no fixed law of development, causing all the inhabitants of a country to change abruptly, or simultaneously, or to an equal degree. The process of modification must be extremely slow. The variability of each species is quite independent of that of all others. Whether such variability be taken advantage of by natural selection, and whether the variations be accumulated to a greater or lesser amount, thus causing a greater or lesser amount of modification in the varying species, depends on many complex contingencies,—on the variability being of a beneficial nature, on the power of intercrossing, on the rate of breeding, on the slowly changing physical conditions of the country, and more especially on the nature of the other inhabitants with which the varying species comes into competition. Hence it is by no means surprising that one species should retain the same identical form much longer than others; or, if changing, that it should change less. We see the same fact in geographical distribution; for instance, in the land-shells and coleopterous insects of Madeira having come to differ considerably from their nearest allies on the continent of Europe, whereas the marine shells and birds have remained unaltered. We can perhaps understand the apparently quicker rate of change in terrestrial and in more highly organised productions compared with marine and lower productions, by the more complex relations of the higher beings to their organic and inorganic conditions of life, as explained in a former chapter. When many of the inhabitants of a country have become modified and improved, we can understand, on the principle of competition, and on that of the many all-important relations of organism to organism, that any form which does not become in some degree modified and improved, will be liable to be exterminated. Hence we can see why all the species in the same region do at last, if we look to wide enough intervals of time, become modified; for those which do not change will become extinct.')
|
|
> assert 6 <= article.level <= 8
|
|
E assert 6 <= 5
|
|
E + where 5 = <vocabulary.ArticleVocabularyLevel object at 0x000001FF1BB0E5D0>.level
|
|
|
|
test_vocabulary.py:53: AssertionError
|
|
|
|
test_vocabulary.py::test_user_level_empty_dictionary PASSED [ 62%]
|
|
test_vocabulary.py::test_user_level_one_simple_word PASSED [ 68%]
|
|
test_vocabulary.py::test_user_level_invalid_word PASSED [ 75%]
|
|
test_vocabulary.py::test_user_level_one_hard_word PASSED [ 81%]
|
|
test_vocabulary.py::test_user_level_multiple_words FAILED [ 87%]
|
|
test_vocabulary.py:74 (test_user_level_multiple_words)
|
|
6 != 1
|
|
|
|
Expected :1
|
|
Actual :6
|
|
<Click to see difference>
|
|
|
|
def test_user_level_multiple_words():
|
|
''' Boundary case test '''
|
|
user = UserVocabularyLevel(
|
|
{'sessile': ['202408050930'], 'putrid': ['202408050930'], 'prodigal': ['202408050930'], 'presumptuous': ['202408050930'], 'prehension': ['202408050930'], 'pied': ['202408050930'], 'pedunculated': ['202408050930'], 'pasture': ['202408050930'], 'parturition': ['202408050930'], 'ovigerous': ['202408050930'], 'ova': ['202408050930'], 'orifice': ['202408050930'], 'obliterate': ['202408050930'], 'niggard': ['202408050930'], 'neuter': ['202408050930'], 'locomotion': ['202408050930'], 'lineal': ['202408050930'], 'glottis': ['202408050930'], 'frivolous': ['202408050930'], 'frena': ['202408050930'], 'flotation': ['202408050930'], 'ductus': ['202408050930'], 'dorsal': ['202408050930'], 'dearth': ['202408050930'], 'crustacean': ['202408050930'], 'cornea': ['202408050930'], 'contrivance': ['202408050930'], 'collateral': ['202408050930'], 'cirriped': ['202408050930'], 'canon': ['202408050930'], 'branchiae': ['202408050930'], 'auditory': ['202408050930'], 'articulata': ['202408050930'], 'alimentary': ['202408050930'], 'adduce': ['202408050930'], 'aberration': ['202408050930']}
|
|
)
|
|
> assert 6 <= user.level <= 8
|
|
E assert 6 <= 1
|
|
E + where 1 = <vocabulary.UserVocabularyLevel object at 0x000001FF1BB0DCD0>.level
|
|
|
|
test_vocabulary.py:80: AssertionError
|
|
|
|
test_vocabulary.py::test_user_level_consider_only_most_recent_words_difficult_words_most_recent PASSED [ 93%]
|
|
test_vocabulary.py::test_user_level_consider_only_most_recent_words_easy_words_most_recent PASSED [100%]
|
|
|
|
======================== 2 failed, 14 passed in 0.10s =========================
|
|
|
|
Process finished with exit code 1
|