Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The programs still has Assertion error: week 1 c _ test.py: 8 : AssertionError = = = = = = = = = = =

The programs still has Assertion error:
week1c_test.py:8: AssertionError
========================================================================== short test summary info ===========================================================================
FAILED week1c_test.py::test_story2- AssertionError: assert 'Beautiful is...re of those !'== 'beautiful is...ore of those!'
import pytest
from week1 import editor
## dont change anything!!!
def test_story2():
new_text, top_five = editor('data/story2.txt')
expected=['is','better','than','to','the']
assert set(top_five)==set(expected)
assert new_text =='''beautiful is better than ugly.explicit is better than implicit.simple is better than complex.complex is better than complicated.flat is better than nested.sparse is better than dense.readability counts.special cases aren't special enough to break the rules.although practicality beats purity.errors should never pass silently.unless explicitly silenced.in the face of ambiguity, refuse the temptation to guess.there should be one-- and preferably only one --obvious way to do it.although that way may not be obvious at first unless you're dutch.now is better than never.although never is often better than *right* now.if the implementation is hard to explain, it's a bad idea.if the implementation is easy to explain, it may be a good idea.namespaces are one honking great idea -- let's do more of those!'''
import pytest
from week1 import editor
## dont change anything!!!
def test_story1():
new_text, top_five = editor('data/story.txt')
expected=['the','of','and','with','a']
assert set(top_five)==set(expected)
assert new_text =='''the man and his wife, talking of the latest armed robbery in the suburb, were distracted by the sight of the little boy's pet cat effortlessly arriving over the seven-foot wall, descending first with a rapid bracing of extended forepaws down on the sheer vertical surface, and then a graceful launch, landing with swishing tail within the property.'''

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sybase Database Administrators Handbook

Authors: Brian Hitchcock

1st Edition

0133574776, 978-0133574777

More Books

Students also viewed these Databases questions