Mercurial > code > home > repos > light9
annotate test/test_sub.py @ 1185:a9a5243f8f89
checkpoint show data
Ignore-this: 17e0380af23b292973978b98bab1aa9
author | drewp@bigasterisk.com |
---|---|
date | Sun, 15 Jun 2014 17:31:02 +0000 |
parents | b94abe02eefc |
children |
rev | line source |
---|---|
418 | 1 import os |
2 from light9.Submaster import Submaster | |
3 | |
4 def testCalc(): | |
5 dest = "/home/drewp/projects/light9/show/dance2007/subs/sub" | |
6 try: | |
7 os.remove(dest) | |
8 except OSError: | |
9 pass | |
10 | |
11 sub = Submaster('sub', {'front1' : .5, 'front2' : .7}) | |
12 assert not sub.no_nonzero() | |
13 assert sub.get_dmx_list() | |
14 sub.save() | |
15 | |
16 assert os.path.exists(dest) | |
17 | |
18 sub2 = Submaster('sub') | |
19 sub2.reload() | |
20 assert sub == sub2 | |
21 assert sub2.get_levels() == {'front1' : .5, 'front2' : .7} |