23 lines
713 B
Python
23 lines
713 B
Python
import core.utils
|
|
import pytest
|
|
|
|
|
|
@pytest.mark.parametrize("lst, as_string", [
|
|
(None, "",),
|
|
([], ""),
|
|
(["hello", "world"], "hello world"),
|
|
# (["hello world", "my friend"], '"hello world" "my friend"')
|
|
])
|
|
def test_i_can_create_string_from_a_list(lst, as_string):
|
|
assert core.utils.sysarg_to_string(lst) == as_string
|
|
|
|
|
|
def test_i_can_get_classes():
|
|
classes = list(core.utils.get_classes("core.builtin_concepts"))
|
|
error_concept = core.utils.get_class("core.builtin_concepts.ErrorConcept")
|
|
return_value_concept = core.utils.get_class("core.builtin_concepts.ReturnValueConcept")
|
|
|
|
assert len(classes) > 2
|
|
assert error_concept in classes
|
|
assert return_value_concept in classes
|