Skip to content

Commit

Permalink
some more test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Dec 13, 2024
1 parent f67dee8 commit 69ce28e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/functional/syntax/test_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ def foo():
{"top.vy": top, "subdir0/lib0.vy": lib0, "subdir0/subdir1/lib1.vy": lib1}
)

file_input = input_bundle.load_file("top.vy")
with pytest.raises(ModuleNotFound):
compiler.compile_code(top, input_bundle=input_bundle)
compiler.compile_from_file_input(file_input, input_bundle=input_bundle)

lib0 = """
from subdir1 import lib1 as lib1
Expand All @@ -40,8 +41,9 @@ def foo():
{"top.vy": top, "subdir0/lib0.vy": lib0, "subdir0/subdir1/lib1.vy": lib1}
)

file_input = input_bundle.load_file("top.vy")
with pytest.raises(ModuleNotFound):
compiler.compile_code(top, input_bundle=input_bundle)
compiler.compile_from_file_input(file_input, input_bundle=input_bundle)


def test_relative_import_searches_only_current_path(make_input_bundle):
Expand Down

0 comments on commit 69ce28e

Please sign in to comment.