Mercurial > code > home > repos > light9
annotate test/test_sub.py @ 1439:951ef08ce4ad
don't save zeros in effects. put each fx in its own n3 file
Ignore-this: a2b27986c2aacd3f48fd9110b6d673a0
author | drewp@bigasterisk.com |
---|---|
date | Sat, 11 Jun 2016 21:13:01 +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} |