1. Georg Brandl
  2. pyflakes-ast

Commits

Ronny Pfannschmidt  committed 993d247

add a test execnet channel only being defined after the channel check

  • Participants
  • Parent commits ab9af67
  • Branches experimental

Comments (0)

Files changed (1)

File pyflakes/test/test_scopes.py

View file
             channel.send('works')
         """)
 
+    def test_execnet_channelexec_defines_channel_only_after_check(self):
+        self.flakes("""
+            channel
+            if __name__ == '__channelexec__':
+                channel.send('works')
+        """, m.UndefinedName)
+
     def test_tracebackhide_needs_no_using_is_ok(self):
         self.flakes("""
             def helper():