Skip to content

Commit ef502ab

Browse files
committed
#43 test cases added
1 parent 8caed4f commit ef502ab

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/test_utils.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""
2+
Test related to utilities
3+
"""
4+
import os
5+
6+
from s_tool.utils import is_local
7+
8+
9+
def test_local_path():
10+
"""test local file path or URL"""
11+
URL_PATH = "http://www.google.com"
12+
URL_PATH1 = "www.google.com"
13+
LOCAL_PATH = "tests/index.html"
14+
15+
assert URL_PATH == is_local(URL_PATH)
16+
assert "file" in is_local(os.path.abspath(LOCAL_PATH))
17+
assert URL_PATH1 == is_local(URL_PATH1)

0 commit comments

Comments
 (0)