File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1+ # encoding: utf-8
2+
3+ import os
4+ import sys
5+ import tempfile
6+
7+ from bpython ._py3compat import py3
18from bpython .test import unittest
29from bpython .importcompletion import find_modules
3- import os , sys , tempfile
410
511
6- @unittest .skipIf (sys . version_info [ 0 ] <= 2 , "Test doesn't work in python 2." )
12+ @unittest .skipIf (not py3 , "Test doesn't work in python 2." )
713class TestAvoidSymbolicLinks (unittest .TestCase ):
814 def setUp (self ):
915 with tempfile .TemporaryDirectory () as import_test_folder :
@@ -61,7 +67,7 @@ def setUp(self):
6167 True ,
6268 )
6369
64- self .foo = list (find_modules (os .path .abspath (import_test_folder )))
70+ self .modules = list (find_modules (os .path .abspath (import_test_folder )))
6571 self .filepaths = [
6672 "Left.toRight.toLeft" ,
6773 "Left.toRight" ,
@@ -76,7 +82,7 @@ def setUp(self):
7682 ]
7783
7884 def test_simple_symbolic_link_loop (self ):
79- for thing in self .foo :
85+ for thing in self .modules :
8086 self .assertTrue (thing in self .filepaths )
8187 if thing == "Left.toRight.toLeft" :
8288 self .filepaths .remove ("Right.toLeft" )
You can’t perform that action at this time.
0 commit comments