# Path: pyczmq/zctx.py
# def shadow(ctx):
# def shadow_zmq_ctx(zmqctx):
# def shadow_pyzmq_ctx(pyzmqctx):
# def destroy(ctx):
# def new():
# def set_iothreads(ctx, iothreads):
# def set_linger(ctx, linger):
# def set_pipehwm(ctx, pipehwm):
# def set_sndhwm(ctx, sndhwm):
# def set_rcvhwm(ctx, rcvhwm):
# def underlying(ctx):
# 
# Path: pyczmq/zcert.py
# def destroy(cert):
# def new():
# def new_from(public_key, secret_key):
# def public_key(cert):
# def secret_key(cert):
# def public_txt(cert):
# def secret_txt(cert):
# def set_meta(cert, name, value):
# def meta(cert, name):
# def load(filename):
# def save(cert, filename):
# def save_public(cert, filename):
# def apply(cert, zocket):
# def dup(cert):
# def eq(cert, compare):


import os
import shutil
from pyczmq import zctx, zcert
"""
Replicates czmq test_zcert
"""



TESTDIR = ".test_zcert"

def test_zcert():
    ctx = zctx.new()

    if os.path.exists(TESTDIR):
        # delete data from a previous test run
        shutil.rmtree(TESTDIR)
    os.mkdir(TESTDIR)

    # Create a simple certificate with metadata

# Path: pyczmq/zctx.py
# def shadow(ctx):
# def shadow_zmq_ctx(zmqctx):
# def shadow_pyzmq_ctx(pyzmqctx):
# def destroy(ctx):
# def new():
# def set_iothreads(ctx, iothreads):
# def set_linger(ctx, linger):
# def set_pipehwm(ctx, pipehwm):
# def set_sndhwm(ctx, sndhwm):
# def set_rcvhwm(ctx, rcvhwm):
# def underlying(ctx):
# 
# Path: pyczmq/zcert.py
# def destroy(cert):
# def new():
# def new_from(public_key, secret_key):
# def public_key(cert):
# def secret_key(cert):
# def public_txt(cert):
# def secret_txt(cert):
# def set_meta(cert, name, value):
# def meta(cert, name):
# def load(filename):
# def save(cert, filename):
# def save_public(cert, filename):
# def apply(cert, zocket):
# def dup(cert):
# def eq(cert, compare):


# Path: tests/test_zcert.py
import os
import shutil
from pyczmq import zctx, zcert

"""
Replicates czmq test_zcert
"""



TESTDIR = ".test_zcert"

def test_zcert():
    ctx = zctx.new()

    if os.path.exists(TESTDIR):
        # delete data from a previous test run
        shutil.rmtree(TESTDIR)
    os.mkdir(TESTDIR)

    # Create a simple certificate with metadata

    cert = zcert.new()