Skip to content

Commit 98c1d3e

Browse files
authored
Merge pull request #329 from cs50/patch-numb3rs-pyc
Update pyc files for numb3rs
2 parents 0d05f55 + 026add7 commit 98c1d3e

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

numb3rs/__init__.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ def test_incorrect_out_of_range2():
5555
output = "False"
5656
check50.run("python3 testing.py").stdin(input, prompt=True).stdout(output).exit(0)
5757

58-
58+
5959
@check50.check(exists)
6060
def test_incorrect_number_bytes():
6161
"""numb3rs.py prints False for 8.8.8"""
6262
input = "8.8.8"
6363
output = "False"
6464
check50.run("python3 testing.py").stdin(input, prompt=True).stdout(output).exit(0)
65-
65+
6666

6767
@check50.check(exists)
6868
def test_incorrect_number_bytes2():
@@ -88,6 +88,22 @@ def test_non_ip():
8888
check50.run("python3 testing.py").stdin(input, prompt=True).stdout(output).exit(0)
8989

9090

91+
@check50.check(exists)
92+
def test_invalid_octet():
93+
"""numb3rs.py prints False for 1.1.1.11111"""
94+
input = "1.1.1.11111"
95+
output = "False"
96+
check50.run("python3 testing.py").stdin(input, prompt=True).stdout(output).exit(0)
97+
98+
99+
@check50.check(exists)
100+
def test_leading_zero():
101+
"""numb3rs.py prints False for 000.001.010.100"""
102+
input = "000.000.001.010"
103+
output = "False"
104+
check50.run("python3 testing.py").stdin(input, prompt=True).stdout(output).exit(0)
105+
106+
91107
"""
92108
test_numb3rs.py checks
93109
"""

numb3rs/correct_test.pyc

68 Bytes
Binary file not shown.

numb3rs/first_byte_test.pyc

68 Bytes
Binary file not shown.

numb3rs/invalid_format_test.pyc

-5 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)