1. Pypy
  2. Untitled project
  3. pypy

Commits

Carl Friedrich Bolz  committed fb34c35

(arigo, cfbolz): what's not tested is broken

  • Participants
  • Parent commits d23ba11
  • Branches refactor-not-in-translator

Comments (0)

Files changed (2)

File pypy/objspace/flow/objspace.py

View file
         except UnwrapException:
             pass
         else:
-            return not obj
+            return self.wrap(not obj)
         w_falthvalue = self.do_operation('is_false', w_obj)
         return w_falthvalue
 

File pypy/objspace/flow/test/test_objspace.py

View file
             return not x
         graph = self.codetest(f)
         assert self.all_operations(graph) == {"is_false": 1}
+        x = True
+        def f():
+            return not x
+        graph = self.codetest(f)
+        assert self.all_operations(graph) == {}
 
 
     def test_context_manager(self):