def test_number_operator():
    'Test number operator'
    nmode = 3
    check_str = '1 [0^ 0] +\n1 [1^ 1] +\n1 [2^ 2] '
    assert (str(number_operator(nmode)) == check_str)
    check_str2 = '1 [3^ 3] '
    assert (str(number_operator(None, nmode)) == check_str2)
Test number operator
def test_number_operator():
    
    nmode = 3
    check_str = '1 [0^ 0] +\n1 [1^ 1] +\n1 [2^ 2] '
    assert (str(number_operator(nmode)) == check_str)
    check_str2 = '1 [3^ 3] '
    assert (str(number_operator(None, nmode)) == check_str2)