Skip to content

Commit efe7e6d

Browse files
test: add final dbdate compliance tests and sort (#89)
* fix: address failing compliance tests in DateArray and TimeArray test: add a test session with prerelease versions of dependencies * fix min/max/median for 2D arrays * fixes except for null contains * actually use NaT as 'advertised' * fix!: use `pandas.NaT` for missing values in dbdate and dbtime dtypes This makes them consistent with other date/time dtypes, as well as internally consistent with the advertised `dtype.na_value`. BREAKING-CHANGE: dbdate and dbtime dtypes return NaT instead of None for missing values Release-As: 0.4.0 * more progress towards compliance * address errors in TestMethods * move tests * add prerelease deps * fix: address failing tests with pandas 1.5.0 test: add a test session with prerelease versions of dependencies * fix owlbot config * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * document why microsecond precision is used * use correct units * add box_func tests * typo * fix: avoid TypeError when using sorted search * add unit tests * fix: dbdate and dbtime support set item * add TestMethods * fix: allow comparison with scalar values * correct behavior for comparison with different types and shapes * use same dtype in shape comparison tests * test: add final dbdate compliance tests and sort * remove redundant index tests Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 7495698 commit efe7e6d

File tree

2 files changed

+25
-22
lines changed

2 files changed

+25
-22
lines changed

tests/compliance/date/test_date_compliance.py

+25-18
Original file line numberDiff line numberDiff line change
@@ -27,32 +27,47 @@
2727
import db_dtypes
2828

2929

30-
class TestDtype(base.BaseDtypeTests):
30+
# TODO(https://github.com/googleapis/python-db-dtypes-pandas/issues/87): Add
31+
# compliance tests for arithmetic operations.
32+
33+
# TODO(https://github.com/googleapis/python-db-dtypes-pandas/issues/78): Add
34+
# compliance tests for reduction operations.
35+
36+
37+
class TestComparisonOps(base.BaseComparisonOpsTests):
3138
pass
3239

3340

34-
class TestInterface(base.BaseInterfaceTests):
41+
class TestCasting(base.BaseCastingTests):
3542
pass
3643

3744

3845
class TestConstructors(base.BaseConstructorsTests):
3946
pass
4047

4148

42-
class TestReshaping(base.BaseReshapingTests):
49+
class TestDtype(base.BaseDtypeTests):
4350
pass
4451

4552

4653
class TestGetitem(base.BaseGetitemTests):
4754
pass
4855

4956

50-
class TestMissing(base.BaseMissingTests):
57+
class TestGroupby(base.BaseGroupbyTests):
5158
pass
5259

5360

54-
# TODO(https://github.com/googleapis/python-db-dtypes-pandas/issues/78): Add
55-
# compliance tests for reduction operations.
61+
class TestIndex(base.BaseIndexTests):
62+
pass
63+
64+
65+
class TestInterface(base.BaseInterfaceTests):
66+
pass
67+
68+
69+
class TestMissing(base.BaseMissingTests):
70+
pass
5671

5772

5873
class TestMethods(base.BaseMethodsTests):
@@ -76,25 +91,17 @@ def test_value_counts(self, all_data, dropna):
7691
self.assert_series_equal(result, expected)
7792

7893

79-
class TestCasting(base.BaseCastingTests):
80-
pass
81-
82-
83-
class TestGroupby(base.BaseGroupbyTests):
84-
pass
85-
86-
87-
class TestSetitem(base.BaseSetitemTests):
94+
class TestParsing(base.BaseParsingTests):
8895
pass
8996

9097

9198
class TestPrinting(base.BasePrintingTests):
9299
pass
93100

94101

95-
# TODO(https://github.com/googleapis/python-db-dtypes-pandas/issues/78): Add
96-
# compliance tests for arithmetic operations.
102+
class TestReshaping(base.BaseReshapingTests):
103+
pass
97104

98105

99-
class TestComparisonOps(base.BaseComparisonOpsTests):
106+
class TestSetitem(base.BaseSetitemTests):
100107
pass

tests/compliance/date/test_date_compliance_1_5.py

-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,3 @@
2929

3030
class Test2DCompat(base.NDArrayBacked2DTests):
3131
pass
32-
33-
34-
class TestIndex(base.BaseIndexTests):
35-
pass

0 commit comments

Comments
 (0)