-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalized test initialization in dl_formula (#5)
* Normalized test initialization in dl_formula * Added CH to formula test deps
- Loading branch information
Showing
6 changed files
with
47 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
lib/dl_formula_testing/dl_formula_testing/configuration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from __future__ import annotations | ||
|
||
from typing import ( | ||
Collection, | ||
Optional, | ||
) | ||
|
||
import attr | ||
|
||
from dl_formula.loader import FormulaLibraryConfig | ||
|
||
|
||
@attr.s(kw_only=True) | ||
class FormulaTestEnvironmentConfiguration: | ||
formula_connector_ep_names: Optional[Collection[str]] = attr.ib(default=None) | ||
|
||
def get_formula_library_config(self) -> FormulaLibraryConfig: | ||
return FormulaLibraryConfig( | ||
formula_connector_ep_names=self.formula_connector_ep_names, | ||
) |
10 changes: 10 additions & 0 deletions
10
lib/dl_formula_testing/dl_formula_testing/initialization.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from pytest import Config | ||
|
||
from dl_db_testing.loader import load_db_testing_lib | ||
from dl_formula.loader import load_formula_lib | ||
from dl_formula_testing.configuration import FormulaTestEnvironmentConfiguration | ||
|
||
|
||
def initialize_formula_test(pytest_config: Config, formula_test_config: FormulaTestEnvironmentConfiguration) -> None: | ||
load_db_testing_lib() | ||
load_formula_lib(formula_lib_config=formula_test_config.get_formula_library_config()) |