Started implementing tests
This commit is contained in:
parent
15aef59573
commit
ef2d949dc3
|
@ -0,0 +1,17 @@
|
|||
from lib.sort import sort_libs_by_dependencies
|
||||
from lib.shell import get_from_command
|
||||
|
||||
|
||||
def test_sort():
|
||||
lib_a = {"name":"lib_A", "dependencies":""}
|
||||
lib_b = {"name":"lib_B", "dependencies":"lib_A"}
|
||||
lib_c = {"name":"lib_C", "dependencies":"lib_B"}
|
||||
libs = [lib_c, lib_b, lib_a]
|
||||
sorted = [lib_a, lib_b, lib_c]
|
||||
assert sort_libs_by_dependencies(libs) == sorted
|
||||
|
||||
|
||||
def test_shell():
|
||||
assert get_from_command(["echo", "Hello", "World"]) == "Hello World\n"
|
||||
|
||||
|
Loading…
Reference in New Issue