Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PECO-1707] Move tests to the folders of corresponding projects #2

Open
wants to merge 3 commits into
base: jprakash-db/PECO-1706
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,7 @@ build/
test.env

#intellij stuff
.idea
.idea

# don't commit authentication info to source control
*.env
File renamed without changes.
14 changes: 7 additions & 7 deletions pysql-connector/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ exclude = ['ttypes\.py$', 'TCLIService\.py$']
[tool.black]
exclude = '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|\.svn|_build|buck-out|build|dist|thrift_api)/'

#[tool.pytest.ini_options]
#markers = {"reviewed" = "Test case has been reviewed by Databricks"}
#minversion = "6.0"
#log_cli = "false"
#log_cli_level = "INFO"
#testpaths = ["tests", "src/databricks/sqlalchemy/test_local"]
#env_files = ["test.env"]
[tool.pytest.ini_options]
markers = {"reviewed" = "Test case has been reviewed by Databricks"}
minversion = "6.0"
log_cli = "false"
log_cli_level = "INFO"
testpaths = ["tests"]
env_files = ["test.env"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 9 additions & 1 deletion sqlalchemy-plugin/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,12 @@ ignore_missing_imports = "true"
exclude = ['ttypes\.py$', 'TCLIService\.py$']

[tool.black]
exclude = '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|\.svn|_build|buck-out|build|dist|thrift_api)/'
exclude = '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|\.svn|_build|buck-out|build|dist|thrift_api)/'

[tool.pytest.ini_options]
markers = {"reviewed" = "Test case has been reviewed by Databricks"}
minversion = "6.0"
log_cli = "false"
log_cli_level = "INFO"
testpaths = ["src/sqlalchemy_db/test_local"]
env_files = ["test.env"]
4 changes: 4 additions & 0 deletions sqlalchemy-plugin/src/sqlalchemy_db/README.sqlalchemy.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ A SQLAlchemy 1.4 compatible dialect was first released in connector [version 2.4

To install the dialect and its dependencies:

```shell
pip install databricks-sqlalchemy-dialect
```
or
```shell
pip install databricks-sql-connector[sqlalchemy]
```
Expand Down
4 changes: 2 additions & 2 deletions sqlalchemy-plugin/src/sqlalchemy_db/README.tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ We maintain `_extra.py` with test cases that depend on SQLAlchemy's reusable dia

```
poetry shell
cd src/databricks/sqlalchemy/test
cd sqlalchemy-plugin/src/sqlalchemy_db/test
python -m pytest test_suite.py --dburi \
"databricks://token:$access_token@$host?http_path=$http_path&catalog=$catalog&schema=$schema"
"databricks://token:$access_token@$host?http_path=$http_path&catalog=$catalog&schema=$schema -c ../setup.cfg"
```

Whatever schema you pass in the `dburi` argument should be empty. Some tests also require the presence of an empty schema named `test_schema`. Note that we plan to implement our own `provision.py` which SQLAlchemy can automatically use to create an empty schema for testing. But for now this is a manual process.
Expand Down