Passed
Pull Request — main (#656)
by Yunguan
03:21
created

test.unit.test_backbone_interface   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 13
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_backbone_interface() 0 13 1
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