MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenImageIO / ic_create_test

Function ic_create_test

src/python/unit_tests_imagecache.py:3–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1# unit tests for ImageCache
2
3def ic_create_test():
4 print "Starting ImageCache.create() tests..."
5 print "Every other test requires these tests to pass."
6 # test 1
7 try:
8 cache = None
9 cache = oiio.ImageCache.create()
10 if cache != None:
11 print "Test 1 passed"
12 else:
13 print "Test 1 failed"
14 except:
15 print "Test 1 failed"
16
17 # test 2
18 try:
19 cache = None
20 cache = oiio.ImageCache.create(False)
21 if cache != None:
22 print "Test 2 passed"
23 else:
24 print "Test 2 failed"
25 except:
26 print "Test 2 failed"
27 # test 3
28 try:
29 cache = None
30 cache = oiio.ImageCache.create(True)
31 if cache != None:
32 print "Test 3 passed"
33 else:
34 print "Test 3 failed"
35 except:
36 print "Test 3 failed"
37 # test 4
38 try:
39 cache = None
40 cache = oiio.ImageCache.create("not a proper argument")
41 if cache != None:
42 print "Test 4 passed"
43 else:
44 print "Test 4 failed"
45 except:
46 print "Test 4 failed"
47
48 print
49
50
51def ic_clear_test():

Callers 1

run_testsFunction · 0.85

Calls 1

createMethod · 0.45

Tested by

no test coverage detected