Exemplo n.º 1
0
def test_write_splash():
    from nexus_base import NexusCore
    log = divert_nexus_log()
    nc = NexusCore()
    assert(not nc.wrote_splash)
    nc.write_splash()
    assert('Nexus' in log.contents())
    assert('Please cite:' in log.contents())
    assert(nc.wrote_splash)
    restore_nexus_log()
Exemplo n.º 2
0
def test_enter_leave():
    import os
    from nexus_base import NexusCore

    tpath = testing.setup_unit_test_output_directory('nexus_base','test_enter_leave')

    cwd = os.getcwd()

    log = divert_nexus_log()

    nc = NexusCore()

    nc.enter(tpath)
    tcwd = os.getcwd()
    assert(tcwd==tpath)
    assert('Entering' in log.contents())
    assert(tpath in log.contents())

    nc.leave()
    assert(os.getcwd()==cwd)

    restore_nexus_log()
Exemplo n.º 3
0
def test_empty_init():
    from nexus_base import NexusCore
    nc = NexusCore()