Mercurial > code > home > repos > light9
annotate test/test_sub.py @ 1412:4916b397b5b8
collector: don't fail to start just because some devs can't be mapped
Ignore-this: f05e0d764e7a646f7cd8594b90f66b52
author | drewp@bigasterisk.com |
---|---|
date | Fri, 10 Jun 2016 03:26:27 +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} |