Exemplo n.º 1
0
def test_temp_pyfile():
    src = 'pass\n'
    fname = tt.temp_pyfile(src)
    assert os.path.isfile(fname)
    with open(fname, encoding="utf-8") as fh2:
        src2 = fh2.read()
    assert src2 == src
Exemplo n.º 2
0
def test_temp_pyfile():
    src = "pass\n"
    fname = tt.temp_pyfile(src)
    assert os.path.isfile(fname)
    with open(fname) as fh2:
        src2 = fh2.read()
    nt.assert_equal(src2, src)
Exemplo n.º 3
0
def test_temp_pyfile():
    src = 'pass\n'
    fname, fh = tt.temp_pyfile(src)
    yield nt.assert_true(os.path.isfile(fname))
    fh.close()
    with open(fname) as fh2:
        src2 = fh2.read()
    yield nt.assert_equal(src2, src)
Exemplo n.º 4
0
def test_temp_pyfile():
    src = "pass\n"
    fname, fh = tt.temp_pyfile(src)
    yield nt.assert_true(os.path.isfile(fname))
    fh.close()
    with open(fname) as fh2:
        src2 = fh2.read()
    yield nt.assert_equal(src2, src)
Exemplo n.º 5
0
def test_temp_pyfile():
    src = 'pass\n'
    fname, fh = tt.temp_pyfile(src)
    assert os.path.isfile(fname)
    fh.close()
    with open(fname) as fh2:
        src2 = fh2.read()
    nt.assert_equal(src2, src)