Changeset - 7817e1ef0ff0
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 10 years ago 2015-06-13 06:12:44
drewp@bigasterisk.com
remove 'currentSubLevel' autoapply
Ignore-this: a0351bb0759ee8d35ba1d4e609f93e4b
2 files changed with 2 insertions and 7 deletions:
0 comments (0 inline, 0 general)
light9/effecteval/effect.py
Show inline comments
 
@@ -44,7 +44,8 @@ class CodeLine(object):
 
            r = resources[v] = URIRef(m.group(1))
 
            for uriTypeMatches, wrapFuncName, addlArgs in [
 
                    (self._uriIsCurve(r), 'curve', ', t'),
 
                    (self._uriIsSub(r), 'currentSubLevel', ''),
 
                    # I'm pretty sure this shouldn't be auto-applied: it's reasonable to refer to a sub and not want its current value
 
                    #(self._uriIsSub(r), 'currentSubLevel', ''),
 
            ]:
 
                if uriTypeMatches:
 
                    if not alreadyInFunc(wrapFuncName + '(', m.string, m.start()):
light9/effecteval/test_effect.py
Show inline comments
 
@@ -55,12 +55,6 @@ class TestAsPython(unittest.TestCase):
 
        _, inExpr, expr, uris = ec._asPython()
 
        self.assertEqual('curve(_res0, t+.01)', expr)
 
        self.assertEqual({'_res0': URIRef('http://example/curve1')}, uris)
 

	
 
    def test_sub_uri_expands_to_sub_lookup_func(self):
 
        ec = CodeLine(graph=None, code='x = <http://example/sub1>')
 
        _, inExpr, expr, uris = ec._asPython()
 
        self.assertEqual('currentSubLevel(_res0)', expr)
 
        self.assertEqual({'_res0': URIRef('http://example/sub1')}, uris)
 
        
 
        
 
@mock.patch('light9.effecteval.effect.CodeLine._uriIsCurve', new=isCurve)
0 comments (0 inline, 0 general)