Skip to content

Commit

Permalink
codecov fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Masara committed Aug 27, 2024
1 parent 6f3b535 commit bc580ca
Show file tree
Hide file tree
Showing 12 changed files with 140 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/data/various_modules_package/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from file_creation._module_3 import Reexported
from .class_module import ClassModuleClassD as ClMCD
from file_creation.module_1 import Lv2
from tests.data.various_modules_package import reexport_test

__all__ = [
"reex_1",
Expand Down
5 changes: 5 additions & 0 deletions tests/data/various_modules_package/another_path/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
from typing import TYPE_CHECKING

# Testing if the "not_reexported" module is beeing wrongly reexported b/c of the existence
# of file_creation/package_1/not_reexported.py
from not_reexported import *
import not_reexported

if TYPE_CHECKING:
from another_module import _YetAnotherPrivateClass

Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class NotReexported():
...
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# With this directory we test the reexportation of this file if the root directory imports reexport_test.

class NotReexportedTest:
...
119 changes: 119 additions & 0 deletions tests/safeds_stubgen/api_analyzer/__snapshots__/test__get_api.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -7188,6 +7188,10 @@
'alias': None,
'qualified_name': 'file_creation.module_1.Lv2',
}),
dict({
'alias': None,
'qualified_name': 'tests.data.various_modules_package.reexport_test',
}),
])
# ---
# name: test_imports[__init__ (wildcard_imports)]
Expand Down Expand Up @@ -7309,6 +7313,10 @@
'alias': None,
'qualified_name': 'file_creation.module_1.Lv2',
}),
dict({
'alias': None,
'qualified_name': 'tests.data.various_modules_package.reexport_test',
}),
]),
'wildcard_imports': list([
dict({
Expand Down Expand Up @@ -7549,12 +7557,19 @@
'alias': None,
'qualified_name': 'typing.TYPE_CHECKING',
}),
dict({
'alias': None,
'qualified_name': 'not_reexported',
}),
dict({
'alias': None,
'qualified_name': 'another_module._YetAnotherPrivateClass',
}),
]),
'wildcard_imports': list([
dict({
'module_name': 'not_reexported',
}),
]),
})
# ---
Expand Down Expand Up @@ -7651,6 +7666,23 @@
]),
})
# ---
# name: test_modules[another_path/not_reexported]
dict({
'classes': list([
]),
'docstring': '',
'enums': list([
]),
'functions': list([
]),
'id': 'tests/data/various_modules_package/another_path/not_reexported',
'name': 'not_reexported',
'qualified_imports': list([
]),
'wildcard_imports': list([
]),
})
# ---
# name: test_modules[attribute_module]
dict({
'classes': list([
Expand Down Expand Up @@ -7986,6 +8018,24 @@
]),
})
# ---
# name: test_modules[file_creation/package_1/not_reexported]
dict({
'classes': list([
'tests/data/various_modules_package/file_creation/package_1/not_reexported/NotReexported',
]),
'docstring': '',
'enums': list([
]),
'functions': list([
]),
'id': 'tests/data/various_modules_package/file_creation/package_1/not_reexported',
'name': 'not_reexported',
'qualified_imports': list([
]),
'wildcard_imports': list([
]),
})
# ---
# name: test_modules[function_module]
dict({
'classes': list([
Expand Down Expand Up @@ -8170,6 +8220,75 @@
]),
})
# ---
# name: test_modules[reexport_test/__init__]
dict({
'classes': list([
]),
'docstring': '',
'enums': list([
]),
'functions': list([
]),
'id': 'tests/data/various_modules_package/reexport_test',
'name': '__init__',
'qualified_imports': list([
]),
'wildcard_imports': list([
]),
})
# ---
# name: test_modules[reexport_test/reexport_test_2/__init__]
dict({
'classes': list([
]),
'docstring': '',
'enums': list([
]),
'functions': list([
]),
'id': 'tests/data/various_modules_package/reexport_test/reexport_test_2',
'name': '__init__',
'qualified_imports': list([
]),
'wildcard_imports': list([
]),
})
# ---
# name: test_modules[reexport_test/reexport_test_2/reexport_test_3/__init__]
dict({
'classes': list([
]),
'docstring': '',
'enums': list([
]),
'functions': list([
]),
'id': 'tests/data/various_modules_package/reexport_test/reexport_test_2/reexport_test_3',
'name': '__init__',
'qualified_imports': list([
]),
'wildcard_imports': list([
]),
})
# ---
# name: test_modules[reexport_test/reexport_test_2/reexport_test_3/reexport_test]
dict({
'classes': list([
'tests/data/various_modules_package/reexport_test/reexport_test_2/reexport_test_3/reexport_test/NotReexportedTest',
]),
'docstring': '',
'enums': list([
]),
'functions': list([
]),
'id': 'tests/data/various_modules_package/reexport_test/reexport_test_2/reexport_test_3/reexport_test',
'name': 'reexport_test',
'qualified_imports': list([
]),
'wildcard_imports': list([
]),
})
# ---
# name: test_modules[type_var_module]
dict({
'classes': list([
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@PythonModule("tests.data.various_modules_package.file_creation.package_1.not_reexported")
package tests.data.variousModulesPackage.fileCreation.package1.notReexported

class NotReexported()
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@PythonModule("tests.data.various_modules_package.reexport_test.reexport_test_2.reexport_test_3.reexport_test")
package tests.data.variousModulesPackage.reexportTest.reexportTest2.reexportTest3.reexportTest

class NotReexportedTest()
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def test_file_creation() -> None:
),
("tests/data/various_modules_package/file_creation/module_1", "module_1"),
("tests/data/various_modules_package/file_creation/package_1/module_5", "module_5"),
("tests/data/various_modules_package/file_creation/package_1/not_reexported", "not_reexported"),
("tests/data/various_modules_package/file_creation/public_reexported", "public_reexported"),
("tests/data/various_modules_package/file_creation", "reexported_from_another_package_3"),
(
Expand Down

0 comments on commit bc580ca

Please sign in to comment.