def test_stuff():
    assert sample.N == 42
    assert sample.square_float(2) == 4
    assert sample.reverse([1, 2, 3]) == (3, 2, 1)

    hz = sample.Hz()
    with pytest.raises(AttributeError):
        hz.zzz = 0
示例#2
0
def main():
    print(sample.N)
    print(sample.square_float(2))
    print(sample.reverse([1, 2, 3]))

    hz = sample.Hz()
    hz.a = 1
    hz.b = 'b'
    hz2 = sample.Hz(hz)
    hz.a = 2
    print(hz, hz2)
示例#3
0
def main():  # pragma: no cover
    print('N =', sample.N)
    print(sample.square_float(2))
    print(sample.reverse([1, 2, 3]))

    hz = sample.Hz()
    hz.a = 1
    hz.b = 'b'
    hz2 = sample.Hz(hz)
    hz.a = 2
    print(hz, hz2)