changeset 1253:7817e1ef0ff0

remove 'currentSubLevel' autoapply Ignore-this: a0351bb0759ee8d35ba1d4e609f93e4b
author drewp@bigasterisk.com
date Sat, 13 Jun 2015 06:12:44 +0000
parents fccb6ca6516d
children da8a4696227f
files light9/effecteval/effect.py light9/effecteval/test_effect.py
diffstat 2 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/light9/effecteval/effect.py	Sat Jun 13 06:09:24 2015 +0000
+++ b/light9/effecteval/effect.py	Sat Jun 13 06:12:44 2015 +0000
@@ -44,7 +44,8 @@
             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()):
--- a/light9/effecteval/test_effect.py	Sat Jun 13 06:09:24 2015 +0000
+++ b/light9/effecteval/test_effect.py	Sat Jun 13 06:12:44 2015 +0000
@@ -55,12 +55,6 @@
         _, 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)