Skip to content
Snippets Groups Projects
Unverified Commit c948e5f4 authored by Jon Crall's avatar Jon Crall
Browse files

docs: add comments to test

parent c2e61324
No related branches found
No related tags found
1 merge request!36Start branch for dev/0.8.2
Pipeline #424261 passed
def test_inheritence():
"""
Test that a inheriting from a dataconfig unions existing config options
with new ones.
"""
from scriptconfig import DataConfig
import ubelt as ub
......@@ -62,6 +66,10 @@ def test_inheritence():
def test_multiple_inheritence():
"""
Ensure that a class can inherit from multiple DataConfigs and become the
union of them.
"""
from scriptconfig import DataConfig
class Fooable(DataConfig):
......@@ -80,6 +88,7 @@ def test_multiple_inheritence():
foo_arg2 = ...
bar_arg2 = ...
foobarg2 = ...
new_arg = 'NEW'
config = Foobarable()
import ubelt as ub
......@@ -94,11 +103,15 @@ def test_multiple_inheritence():
'foobarg2': Ellipsis,
'bar_arg1': 'a',
'bar_arg2': Ellipsis,
'new_arg': 'NEW',
})
''')
def test_multiple_inheritence_diag():
def test_multiple_inheritence_diamond():
"""
Test that diamond inheritence diagrams union options correctly.
"""
from scriptconfig import DataConfig
class Base(DataConfig):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment