@@ -47,8 +47,8 @@ def test_find_nth_root(self):
47
47
48
48
def test_filter_by_string (self ):
49
49
""" @hamdivazim """
50
- lst = ["I really do love apples!" , "Bananas are disgusting !" , "An apple a day keeps the doctor away!" , "You want a pear?" ]
51
- lst2 = [1 , "I really do love apples!" , "Bananas are disgusting !" , "An apple a day keeps the doctor away!" , "You want a pear?" ]
50
+ lst = ["I really do love apples!" , "Bananas are nice !" , "An apple a day keeps the doctor away!" , "You want a pear?" ]
51
+ lst2 = [1 , "I really do love apples!" , "Bananas are nice !" , "An apple a day keeps the doctor away!" , "You want a pear?" ]
52
52
53
53
self .assertEqual (filter_by_string (lst , "apple" )[1 ], "An apple a day keeps the doctor away!" )
54
54
self .assertRaises (TypeError , filter_by_string , lst2 , "apple" )
@@ -65,6 +65,14 @@ def test_generate_random_string(self):
65
65
def test_generateUUID (self ):
66
66
""" @hamdivazim """
67
67
self .assertNotEqual (generateUUID (), generateUUID ())
68
+ self .assertRaises (ValueError , generateUUID , 6 )
69
+
70
+ def test_external_verbose_output (self ):
71
+ """ @hamdivazim """
72
+ external_verbose_output ("Test Data\n 1 2 3\n a b c" , R"usefulib\temp_data\ext_verbose_test.log" )
73
+
74
+ with open (R"usefulib\temp_data\ext_verbose_test.log" , "r" ) as f :
75
+ self .assertEqual (f .read (), "# Logged by usefulibs.external_verbose_output()\n \n Test Data\n 1 2 3\n a b c" )
68
76
69
77
70
78
if __name__ == "__main__" :
0 commit comments