Skip to content

Commit

Permalink
Add marks for the type tests that we've reviewed. This way we can re-run
Browse files Browse the repository at this point in the history
all of the reviewed tests with

pytest test_suite.py -m reviewed

This allows us to check for regressions in a single test command rather
than running each block of types individually.

Signed-off-by: Jesse Whitehouse <[email protected]>
  • Loading branch information
Jesse Whitehouse committed Oct 9, 2023
1 parent 214523b commit 80ae0dd
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ python -m pytest test_suite.py --dburi \
"databricks://token:$access_token@$host?http_path=$http_path&catalog=$catalog&schema=$schema"
```

Some of these of these tests fail currently. We're working on getting relevant tests passing and others skipped.
Some of these of these tests fail currently. We're working on getting relevant tests passing and others skipped. The tests that we've already reviewed and verified
are decorated with a pytest marker called `reviewed`. To only run these tests and check for regressions, you can add `-m reviewed` to the invocation command above.

### Code formatting

Expand Down
1 change: 1 addition & 0 deletions src/databricks/sqlalchemy/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import sqlalchemy.testing.requirements
import sqlalchemy.testing.exclusions


class Requirements(sqlalchemy.testing.requirements.SuiteRequirements):
@property
def date_historic(self):
Expand Down
65 changes: 65 additions & 0 deletions src/databricks/sqlalchemy/test/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,71 @@ class BinaryTest(BinaryTest):
pass


@pytest.mark.reviewed
class BooleanTest(BooleanTest):
pass


@pytest.mark.reviewed
class NumericTest(NumericTest):
pass


@pytest.mark.reviewed
class TimeMicrosecondsTest(TimeMicrosecondsTest):
pass


@pytest.mark.reviewed
class TextTest(TextTest):
pass


@pytest.mark.reviewed
class StringTest(StringTest):
pass


@pytest.mark.reviewed
class DateTimeMicrosecondsTest(DateTimeMicrosecondsTest):
pass


@pytest.mark.reviewed
class TimestampMicrosecondsTest(TimestampMicrosecondsTest):
pass


@pytest.mark.reviewed
class DateTimeCoercedToDateTimeTest(DateTimeCoercedToDateTimeTest):
pass


@pytest.mark.reviewed
class TimeTest(TimeTest):
pass


@pytest.mark.reviewed
class DateTimeTest(DateTimeTest):
pass


@pytest.mark.reviewed
class DateTimeHistoricTest(DateTimeHistoricTest):
pass


@pytest.mark.reviewed
class DateTest(DateTest):
pass


@pytest.mark.reviewed
class DateHistoricTest(DateHistoricTest):
pass


class FetchLimitOffsetTest(FetchLimitOffsetTest):
@pytest.mark.skip(
reason="Dialect should advertise which offset rules Databricks supports. Offset handling needs work."
Expand Down

0 comments on commit 80ae0dd

Please sign in to comment.