File:  [CENS] / python / pyGiNaC / test / exlist.tst
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Sun Mar 11 23:07:20 2001 UTC (16 years, 8 months ago) by pearu
Branches: MAIN
CVS tags: HEAD
Wrapped e?vector, expair, exlist

#
# $Id: exlist.tst,v 1.1 2001-03-11 23:07:20 pearu Exp $
# Pearu Peterson

_startup = __import__('__startup__')
module = __import__('GiNaC._ginac',globals(),locals(),['_ginac'])

isinstance(exlist(),exlist) :: 1
isinstance(exlist(4),exlist) :: 1
isinstance(exlist((ex(4),ex(5))),exlist) :: 1
isinstance(exlist((ex(4),ex())),exlist) :: 1
isinstance(exlist(),basic) :: 0
isinstance(exlist(),ex) :: 0

len(exlist()) :: 0
len(exlist(5)) :: 5
len(exlist((ex(3),ex(5),ex(7)))) :: 3
#len(exlist([ex(3),ex(5)])) :: 2

ev = exlist((ex(),ex(symbol("a"))))

ev[0].print_(0) :: 0
ev[1].print_(0) :: a
ev[2].print_(0) :: IndexError,2

len(ev) :: 2
!ev[0] = ex(symbol("i")) :: 
ev[0].print_(0) :: i
ev[1].print_(0) :: a
len(ev) :: 2

ev[0].print_(0) :: i
!ev[3] = ex(symbol("j")) :: IndexError,3
!del ev[4] :: IndexError,4
len(ev) :: 2
!del ev[0] ::
len(ev) :: 1
ev[0].print_(0) :: a

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>