def test_normalize_mask_not_int(version, mask): with pytest.raises(ValueError) as ex: encoder.normalize_mask(mask, version < 1) assert 'Invalid data mask' in str(ex.value)
def test_normalize_mask_not_int(version, mask): with pytest.raises(encoder.MaskError): encoder.normalize_mask(mask, version < 1)
def test_normalize_mask_none(): assert encoder.normalize_mask(None, is_micro=True) is None assert encoder.normalize_mask(None, is_micro=False) is None
def test_normalize_mask_illegal(version, mask): with pytest.raises(encoder.MaskError): encoder.normalize_mask(mask, version < 1)
def test_normalize_mask_micro(mask): assert mask == encoder.normalize_mask(mask, is_micro=True)
def test_normalize_mask(mask): assert mask == encoder.normalize_mask(mask, is_micro=False)
def test_normalize_mask_none(): assert encoder.normalize_mask(None, is_micro=True) is None assert encoder.normalize_mask(None, is_micro=False) is None
def test_normalize_mask_micro(mask): assert mask == encoder.normalize_mask(mask, is_micro=True)
def test_normalize_mask(mask): assert mask == encoder.normalize_mask(mask, is_micro=False)