Exemplo n.º 1
0
def st(request):
    os.chdir('tests')
    s = StorjTorrent()

    def fin():
        s.halt_session()
        for path in [
                'data.fastresume', 'storj.torrent', 'test.torrent',
                '/tmp/test.torrent', 'storj.torrent', '/tmp/storj.torrent'
        ]:
            os.remove(path) if os.path.exists(path) else None
        os.chdir('../')

    request.addfinalizer(fin)
    return s