def test_reset_dhist():
    "Test '%reset dhist' magic"
    _ip.run_cell('tmp = [d for d in _dh]')
    _ip.magic(('cd ' + os.path.dirname(nt.__file__)))
    _ip.magic('cd -')
    nt.assert_true((len(_ip.user_ns['_dh']) > 0))
    _ip.magic('reset -f dhist')
    nt.assert_equal(len(_ip.user_ns['_dh']), 0)
    _ip.run_cell('_dh = [d for d in tmp]')
Test '%reset dhist' magic
def test_reset_dhist():
    
    _ip.run_cell('tmp = [d for d in _dh]')
    _ip.magic(('cd ' + os.path.dirname(nt.__file__)))
    _ip.magic('cd -')
    nt.assert_true((len(_ip.user_ns['_dh']) > 0))
    _ip.magic('reset -f dhist')
    nt.assert_equal(len(_ip.user_ns['_dh']), 0)
    _ip.run_cell('_dh = [d for d in tmp]')