# HG changeset patch # User drewp@bigasterisk.com # Date 2015-06-13 06:12:44 # Node ID 7817e1ef0ff03b262bd7d0776f1252d4b91f2f80 # Parent fccb6ca6516decd54777a6d85e3df20248fda2d2 remove 'currentSubLevel' autoapply Ignore-this: a0351bb0759ee8d35ba1d4e609f93e4b diff --git a/light9/effecteval/effect.py b/light9/effecteval/effect.py --- a/light9/effecteval/effect.py +++ b/light9/effecteval/effect.py @@ -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()): diff --git a/light9/effecteval/test_effect.py b/light9/effecteval/test_effect.py --- a/light9/effecteval/test_effect.py +++ b/light9/effecteval/test_effect.py @@ -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 = ') - _, 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)