Skip to content

Commit 53c7b6e

Browse files
committed
Added more tests to String Multiplication task
1 parent 8b2b3d2 commit 53c7b6e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Strings/String multiplication/tests/test_task.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,14 @@ def test_food(self):
99

1010
except ImportError:
1111
self.assertTrue(False, msg="Do not rename any variables.")
12+
13+
def test_0_code_len(self):
14+
with open("string_multiplication.py", "r") as taskfile:
15+
lines = taskfile.readlines()
16+
self.assertTrue(len(lines) == 3, msg="Please do not add or remove any lines from the code file.")
17+
18+
def test_statement_1(self):
19+
with open("string_multiplication.py", "r") as taskfile:
20+
lines = taskfile.readlines()
21+
code = lines[-2]
22+
self.assertTrue("*" in code, msg="Your solution does not use string multiplication.")

0 commit comments

Comments
 (0)