Completed
Push — master ( 6737d1...1af191 )
by
unknown
09:46
created

test_from_byte_order()   B

Complexity

Conditions 6

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 6
c 1
b 0
f 0
dl 0
loc 8
rs 8
1
import pytest
2
3
from starstruct import Mode
4
5
6
def test_from_byte_order():
7
    assert Mode.from_byteorder('little') == Mode.Little
8
    assert Mode.from_byteorder('big') == Mode.Big
9
    assert Mode.from_byteorder('native') == Mode.Native
10
    assert Mode.from_byteorder('network') == Mode.Network
11
12
    with pytest.raises(TypeError):
13
        Mode.from_byteorder('random thing')
14