Mercurial > code > home > repos > light9
annotate test/test_sub.py @ 1720:9723a5ab27d6
fight coffeescript on how to get ctor called
Ignore-this: b74e7e5547fb234716862e5dfa4e2885
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Mon, 07 May 2018 00:38:33 +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} |