Skip to content

Chapter 6 - Test File #1

Description

@safeisrisky

Hi,

I think there is a bug in the test file for Chapter 6 - tiny_python_projects/06_wc/test.py/

The following is a test function

def test_more():
"""Test on more than one file"""
rv, out = getstatusoutput(f'{prg} {fox} {sonnet}')
expected = (' 1 9 45 ../inputs/fox.txt\n'
' 17 118 661 ../inputs/sonnet-29.txt\n'
' 18 127 706 total')
assert rv == 0
assert out.rstrip() == expected

I think the above test function should have been

def test_more():
"""Test on more than one file"""
rv, out = getstatusoutput(f'{prg} {fox} {sonnet}')
expected = (' 1 9 45 ../inputs/fox.txt\n'
' 17 118 669 ../inputs/sonnet-29.txt\n'
' 18 127 714 total')
assert rv == 0
assert out.rstrip() == expected

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions