2 from nose
import with_setup
10 def test_assignment():
11 i
.push('(define a "foo")')
12 v
= i
.push("(cons a a)")
13 a
= boa
.cons('foo', 'foo')
14 assert boa
.eq_p(v
, a
), (v
, a
)
16 i
.push('(define b 2)')
18 assert boa
.eq_p(v
, 2), type(v
)
27 assert boa
.eq_p(v
, 3), v
30 def test_procedures():
38 assert boa
.eq_p(v
, 13)
44 ((lambda (a) (+ a a)) x)))
47 assert boa
.eq_p(v
, 6), v
58 (define a1 (counter 3))
59 (define a2 (counter 5))
67 assert boa
.eq_p(v
, boa
.cons(7, 8))
72 (define os (import "os"))
75 assert boa
.eq_p(v
, os
.getlogin()), v
77 def test_import_hook():
87 ((when c e) (if c e))))
92 assert boa
.eq_p(v
, 7), v