10 |
sc = gzz.media.impl.PageImageScroll(None, gzz.mediaserver.Mediaserver.Id(id)) |
sc = gzz.media.impl.PageImageScroll(None, gzz.mediaserver.Mediaserver.Id(id)) |
11 |
|
|
12 |
def testTestSpan(): |
def testTestSpan(): |
13 |
|
"""Test that we really have the pagespan images. |
14 |
|
|
15 |
|
If not, all other tests in this file will fail too. |
16 |
|
""" |
17 |
failUnlessEqual(sc.getCurrent().length(), 2) |
failUnlessEqual(sc.getCurrent().length(), 2) |
18 |
|
|
19 |
|
def testNobg(): |
20 |
|
"""Test that the image gets loaded correctly from GLSpanner. |
21 |
|
|
22 |
|
fail: * |
23 |
|
""" |
24 |
|
|
25 |
|
pagespan = GLSpanner.getSpanRect(sc.getCurrent()).page |
26 |
|
p = PageSpanPaper(None, pagespan) |
27 |
|
|
28 |
|
pap = p.getPaper(0) |
29 |
|
|
30 |
|
vs = getvs() |
31 |
|
vs.map.put(SolidBgVob(Color.yellow)) |
32 |
|
|
33 |
|
pcs = vs.orthoCS(0, "A", 0, 50, 50, 400, 400) |
34 |
|
vs.map.put( |
35 |
|
GLRen.createPaperQuad(pap, 0, 0, p.w, p.h, 1, 1, 0), |
36 |
|
pcs, 0) |
37 |
|
|
38 |
|
for i in range(0, 10): |
39 |
|
pagespan.request(1, 5000) |
40 |
|
render(vs) |
41 |
|
Thread.sleep(100) |
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
failUnlessEqual(0, 1) |