@@ -43,6 +43,7 @@ def test_no_fullname(self):
43
43
44
44
dir_path , only_file_name = os .path .split (path )
45
45
self .assertTrue (os .path .exists (dir_path ))
46
+ self .assertIsNotNone (only_file_name )
46
47
47
48
def test_no_path (self ):
48
49
"""
@@ -55,6 +56,7 @@ def test_no_path(self):
55
56
56
57
dir_path , only_file_name = os .path .split (path )
57
58
self .assertTrue (os .path .exists (dir_path ))
59
+ self .assertIsNotNone (only_file_name )
58
60
59
61
def test_current_path (self ):
60
62
"""
@@ -67,3 +69,17 @@ def test_current_path(self):
67
69
68
70
dir_path , only_file_name = os .path .split (path )
69
71
self .assertTrue (os .path .exists (dir_path ))
72
+ self .assertIsNotNone (only_file_name )
73
+
74
+ def test_path_with_file_name (self ):
75
+ """
76
+ Test export path with path and file name specified.
77
+ """
78
+ path , file_name = get_export_path (self .ss ,
79
+ 'DCOPF' ,
80
+ path = './test_export.csv' ,
81
+ fmt = 'csv' ,)
82
+
83
+ dir_path , only_file_name = os .path .split (path )
84
+ self .assertTrue (os .path .exists (dir_path ))
85
+ self .assertEqual (only_file_name , 'test_export.csv' )
0 commit comments