Mercurial > code > home > repos > light9
annotate test/test_sub.py @ 2210:ddff5ce676eb
reorder
author | drewp@bigasterisk.com |
---|---|
date | Mon, 22 May 2023 13:55:04 -0700 |
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} |