Add project configuration files and clean up code
- Added .gitignore to exclude IDE-specific files. - Created inspection profiles for code quality checks. - Set up project metadata in various XML files. - Removed unused dependencies from the lock file. - Refactored main.py to streamline function calls and imports.
This commit is contained in:
+18
-21
@@ -1,31 +1,28 @@
|
||||
"""Run integration tests with a speckle server."""
|
||||
|
||||
from pydantic import SecretStr
|
||||
|
||||
from speckle_automate import (
|
||||
AutomationContext,
|
||||
AutomationRunData,
|
||||
AutomationStatus,
|
||||
run_function
|
||||
run_function,
|
||||
)
|
||||
from speckle_automate.fixtures import * # noqa: F401, F403
|
||||
|
||||
from main import FunctionInputs, automate_function
|
||||
|
||||
from speckle_automate.fixtures import *
|
||||
from src.function import automate_function
|
||||
from src.inputs import FunctionInputs, SanitizationMode
|
||||
|
||||
|
||||
def test_function_run(test_automation_run_data: AutomationRunData, test_automation_token: str):
|
||||
"""Run an integration test for the automate function."""
|
||||
automation_context = AutomationContext.initialize(
|
||||
test_automation_run_data, test_automation_token
|
||||
)
|
||||
automate_sdk = run_function(
|
||||
automation_context,
|
||||
automate_function,
|
||||
FunctionInputs(
|
||||
forbidden_speckle_type="None",
|
||||
whisper_message=SecretStr("testing automatically"),
|
||||
),
|
||||
)
|
||||
class TestFunction:
|
||||
def test_function_run(self, test_automation_run_data: AutomationRunData, test_automation_token: str) -> None:
|
||||
"""Run an integration test for the automate function."""
|
||||
automation_context = AutomationContext.initialize(test_automation_run_data, test_automation_token)
|
||||
|
||||
assert automate_sdk.run_status == AutomationStatus.SUCCEEDED
|
||||
automate_sdk = run_function(
|
||||
automation_context,
|
||||
automate_function,
|
||||
FunctionInputs(
|
||||
sanitization_mode=SanitizationMode.PREFIX_MATCHING,
|
||||
forbidden_parameter_input="Speckle"
|
||||
),
|
||||
)
|
||||
|
||||
assert automate_sdk.run_status == AutomationStatus.SUCCEEDED
|
||||
|
||||
Reference in New Issue
Block a user