1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/from_import/another.py Sun Nov 13 22:18:29 2016 +0100
1.3 @@ -0,0 +1,7 @@
1.4 +class C:
1.5 + d = 123
1.6 +
1.7 +c = C()
1.8 +
1.9 +def f():
1.10 + return c
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/tests/from_import/main.py Sun Nov 13 22:18:29 2016 +0100
2.3 @@ -0,0 +1,17 @@
2.4 +from another import f, c
2.5 +
2.6 +def function():
2.7 + return c
2.8 +
2.9 +def fn():
2.10 + return f()
2.11 +
2.12 +def altname():
2.13 + c = fn()
2.14 + return c
2.15 +
2.16 +d = c.d
2.17 +e = function().d
2.18 +g = f().d
2.19 +h = fn().d
2.20 +i = altname().d
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/tests/from_import_redefine_bad/another.py Sun Nov 13 22:18:29 2016 +0100
3.3 @@ -0,0 +1,7 @@
3.4 +class C:
3.5 + d = 123
3.6 +
3.7 +c = C()
3.8 +
3.9 +def f():
3.10 + return c
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/tests/from_import_redefine_bad/main.py Sun Nov 13 22:18:29 2016 +0100
4.3 @@ -0,0 +1,15 @@
4.4 +from another import f, c, C
4.5 +
4.6 +def function():
4.7 + return c
4.8 +
4.9 +def fn():
4.10 + return f()
4.11 +
4.12 +def f(): # would redefine f from another
4.13 + return c
4.14 +
4.15 +d = c.d
4.16 +e = function().d
4.17 +g = f().d
4.18 +h = fn().d
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/tests/from_import_replace_bad/another.py Sun Nov 13 22:18:29 2016 +0100
5.3 @@ -0,0 +1,7 @@
5.4 +class C:
5.5 + d = 123
5.6 +
5.7 +c = C()
5.8 +
5.9 +def f():
5.10 + return c
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/tests/from_import_replace_bad/main.py Sun Nov 13 22:18:29 2016 +0100
6.3 @@ -0,0 +1,14 @@
6.4 +from another import f, c, C
6.5 +
6.6 +def function():
6.7 + return c
6.8 +
6.9 +def fn():
6.10 + return f()
6.11 +
6.12 +d = c.d
6.13 +c = C() # would replace c from another
6.14 +e = function().d
6.15 +f = function # would replace f from another
6.16 +g = f().d
6.17 +h = fn().d