Passed
Pull Request — main (#656)
by Yunguan
02:55
created

test_backbone_interface()   A

Complexity

Conditions 1

Size

Total Lines 13
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 13
rs 9.85
c 0
b 0
f 0
cc 1
nop 0
1
# coding=utf-8
2
3
"""
4
Tests for deepreg/model/backbone/interface.py
5
"""
6
import deepreg.model.backbone as backbone
7
8
9
def test_backbone_interface():
10
    """Test the get_config of the interface"""
11
    config = dict(
12
        image_size=(5, 5, 5),
13
        out_channels=3,
14
        num_channel_initial=4,
15
        out_kernel_initializer="zeros",
16
        out_activation="relu",
17
        name="test",
18
    )
19
    model = backbone.Backbone(**config)
20
    got = model.get_config()
21
    assert got == config
22