summaryrefslogtreecommitdiff
path: root/tests/testdata/python3
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2021-10-06 22:01:16 +0200
committerGitHub <noreply@github.com>2021-10-06 22:01:16 +0200
commit47985f326bae2d96c575d9158c2ae2d8280b1862 (patch)
tree3b781fae6083018e8f852add858f2fed748f3b84 /tests/testdata/python3
parent395bfbd670a6bf3fa043f5e7b509b9df5b83a714 (diff)
downloadastroid-git-47985f326bae2d96c575d9158c2ae2d8280b1862.tar.gz
Fix regression introduced by #1186 and add tests (#1204)
This closes #1200
Diffstat (limited to 'tests/testdata/python3')
-rw-r--r--tests/testdata/python3/data/beyond_top_level_two/__init__.py0
-rw-r--r--tests/testdata/python3/data/beyond_top_level_two/a.py7
-rw-r--r--tests/testdata/python3/data/beyond_top_level_two/level1/__init__.py2
-rw-r--r--tests/testdata/python3/data/beyond_top_level_two/level1/beyond_top_level_two.py2
4 files changed, 11 insertions, 0 deletions
diff --git a/tests/testdata/python3/data/beyond_top_level_two/__init__.py b/tests/testdata/python3/data/beyond_top_level_two/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/testdata/python3/data/beyond_top_level_two/__init__.py
diff --git a/tests/testdata/python3/data/beyond_top_level_two/a.py b/tests/testdata/python3/data/beyond_top_level_two/a.py
new file mode 100644
index 00000000..4b238dea
--- /dev/null
+++ b/tests/testdata/python3/data/beyond_top_level_two/a.py
@@ -0,0 +1,7 @@
+# pylint: disable=missing-docstring
+
+from .level1.beyond_top_level_two import func
+
+
+def do_something(var, some_other_var): # error
+ func(var, some_other_var)
diff --git a/tests/testdata/python3/data/beyond_top_level_two/level1/__init__.py b/tests/testdata/python3/data/beyond_top_level_two/level1/__init__.py
new file mode 100644
index 00000000..1a886aa4
--- /dev/null
+++ b/tests/testdata/python3/data/beyond_top_level_two/level1/__init__.py
@@ -0,0 +1,2 @@
+def func(var):
+ pass
diff --git a/tests/testdata/python3/data/beyond_top_level_two/level1/beyond_top_level_two.py b/tests/testdata/python3/data/beyond_top_level_two/level1/beyond_top_level_two.py
new file mode 100644
index 00000000..cc28914e
--- /dev/null
+++ b/tests/testdata/python3/data/beyond_top_level_two/level1/beyond_top_level_two.py
@@ -0,0 +1,2 @@
+def func(var, some_other_var):
+ pass