mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-03 15:16:56 +00:00

* Initial implementation for our Connection Class * Implement the Initial Connection class * Add Unit Tests * Implement Dependency Injection for the Ingestion Framework * Fix Test * Fix Profile Test Connection * Fix test, making the injection test run last * Update connections.py * Changed NewType to an AbstractClass to avoid linting issues * remove comment * Fix bug in service spec * Update PyTest version to avoid importlib.reader wrong import
31 lines
892 B
Python
31 lines
892 B
Python
def pytest_pycollect_makeitem(collector, name, obj):
|
|
try:
|
|
if obj.__name__ in ("TestSuiteSource", "TestSuiteInterfaceFactory"):
|
|
return []
|
|
if obj.__base__.__name__ in ("BaseModel", "Enum"):
|
|
return []
|
|
except AttributeError:
|
|
pass
|
|
|
|
|
|
def pytest_collection_modifyitems(session, config, items):
|
|
"""Reorder test items to ensure certain files run last."""
|
|
# List of test files that should run last
|
|
last_files = [
|
|
"test_dependency_injector.py",
|
|
# Add other files that should run last here
|
|
]
|
|
|
|
# Get all test items that should run last
|
|
last_items = []
|
|
other_items = []
|
|
|
|
for item in items:
|
|
if any(file in item.nodeid for file in last_files):
|
|
last_items.append(item)
|
|
else:
|
|
other_items.append(item)
|
|
|
|
# Reorder the items
|
|
items[:] = other_items + last_items
|