Skip to content

Commit bcee3f5

Browse files
committed
cleanup
1 parent bf371d1 commit bcee3f5

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

06_wc/test.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
from subprocess import getstatusoutput
99

1010
prg = './wc.py'
11+
empty = './inputs/empty.txt'
12+
one_line = './inputs/one.txt'
13+
two_lines = './inputs/two.txt'
1114
fox = '../inputs/fox.txt'
1215
sonnet = '../inputs/sonnet-29.txt'
1316

@@ -51,27 +54,27 @@ def test_bad_file():
5154
def test_empty():
5255
"""Test on empty"""
5356

54-
rv, out = getstatusoutput(f'{prg} ./empty.txt')
57+
rv, out = getstatusoutput(f'{prg} {empty}')
5558
assert rv == 0
56-
assert out.rstrip() == ' 0 0 0 ./empty.txt'
59+
assert out.rstrip() == ' 0 0 0 ./inputs/empty.txt'
5760

5861

5962
# --------------------------------------------------
6063
def test_one():
6164
"""Test on one"""
6265

63-
rv, out = getstatusoutput(f'{prg} ./one.txt')
66+
rv, out = getstatusoutput(f'{prg} {one_line}')
6467
assert rv == 0
65-
assert out.rstrip() == ' 1 1 2 ./one.txt'
68+
assert out.rstrip() == ' 1 1 2 ./inputs/one.txt'
6669

6770

6871
# --------------------------------------------------
6972
def test_two():
7073
"""Test on two"""
7174

72-
rv, out = getstatusoutput(f'{prg} ./two.txt')
75+
rv, out = getstatusoutput(f'{prg} {two_lines}')
7376
assert rv == 0
74-
assert out.rstrip() == ' 2 2 4 ./two.txt'
77+
assert out.rstrip() == ' 2 2 4 ./inputs/two.txt'
7578

7679

7780
# --------------------------------------------------

0 commit comments

Comments
 (0)