예제 #1
0
    def testRightNumberOfLines(self):
        line_count("dane.txt")
        while True:
            try:
                file = open("count_answer.txt", 'r')
                break
            except IOError:
                print("No such file in this localisation")

        text_l = file.read()
        file.close()
        assert text_l == "Text from file dane.txt contain 7 lines", "line_count failed, wrong answer in the file"
예제 #2
0
 def testCurrencyline_count(self):
     lines = line_count("dane.txt")
     assert lines != None and lines >=0, "line_count failed, wrong number of lines"