Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikvanantwerpen committed Dec 1, 2023
1 parent 75ce150 commit fdf5a45
Show file tree
Hide file tree
Showing 16 changed files with 198 additions and 14 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# --- path: foo/bar.py ---

BAR = 42

# --- path: test.py ---

from foo import bar

bar.BAR
# ^ defined: 7, 3
# ^ defined: 3

foo
# ^ defined:
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --- path: foo.py ---

FOO = 42

# --- path: test.py ---

from foo import FOO

FOO
# ^ defined: 7, 3

foo
# ^ defined:
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --- path: foo.py ---

FOO = 42

# --- path: test.py ---

from foo import FOO as QUX

QUX
# ^ defined: 7, 3

FOO
# ^ defined:
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --- path: foo.py ---

FOO = 42

# --- path: test.py ---

from foo import *

FOO
# ^ defined: 3

foo
# ^ defined:
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# --- path: foo/bar.py ---

BAR = 42

# --- path: test.py ---

from foo.bar import BAR

BAR
# ^ defined: 7, 3

foo
# ^ defined:

bar
# ^ defined:
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# --- path: foo/__init__.py ---

FOO = 42

# --- path: foo/bar/test.py ---

from .. import FOO

FOO
# ^ defined: 7, 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# --- path: foo/bar.py ---

BAR = 42

# --- path: foo/baz/test.py ---

from ..bar import BAR

BAR
# ^ defined: 7, 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# --- path: foo/__init__.py ---

FOO = 42

# --- path: foo/test.py ---

from . import FOO

FOO
# ^ defined: 7, 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# --- path: foo/bar.py ---

BAR = 42

# --- path: foo/test.py ---

from .bar import BAR

BAR
# ^ defined: 7, 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# --- path: foo.py ---

FOO = 42

# --- path: test.py ---

import foo

foo.FOO
# ^ defined: 7, 3
# ^ defined: 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# --- path: foo.py ---

FOO = 42

# --- path: test.py ---

import foo as qux

qux.FOO
# ^ defined: 7, 3
# ^ defined: 3

foo
# ^ defined:
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# --- path: foo/bar.py ---

BAR = 42

# --- path: test.py ---

import foo.bar

foo.bar.BAR
# ^ defined: 7
# ^ defined: 7, 3
# ^ defined: 3

bar
# ^ defined:
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --- path: foo/bar.py ---

BAR = 42

# --- path: test.py ---

import foo.bar as qux

qux.BAR
# ^ defined: 7
# ^ defined: 3

foo
# ^ defined:

bar
# ^ defined:
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# --- path: foo/__init__.py ---
from . import bar
# ^ defined: 6

# --- path: foo/bar/__init__.py ---
BAR = 'b'

# --- path: main.py ---
from foo import bar
# ^ defined: 6

bar.BAR
# ^ defined: 9, 6
# ^ defined: 6
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# --- path: foo/__init__.py ---

FOO = 42

# --- path: foo/bar.py ---

BAR = 42

# --- path: test.py ---

import foo

foo.FOO
# ^ defined: 11, 3
# ^ defined: 3

foo.bar
# ^ defined:

0 comments on commit fdf5a45

Please sign in to comment.