Skip to content

Commit 2bfb71a

Browse files
authored
test(timestamp): add unit tests for timestamp
Signed-off-by: Sarthak Tyagi <153098175+sarthak-cs@users.noreply.github.com>
1 parent 729aaaf commit 2bfb71a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tests/unit/timestamp_test.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ def test_from_date_unix_epoch():
6868
assert ts.nanos == 0
6969

7070

71-
72-
7371
def test_from_date_max_microseconds():
7472
"""Test from_date with maximum microseconds to ensure nanos calculation is correct."""
7573
dt = datetime(2020, 1, 1, 0, 0, 0, 999999, tzinfo=timezone.utc)
@@ -111,12 +109,10 @@ def test_datetime_round_trip_preserves_microseconds():
111109
original = datetime.now(timezone.utc).replace(microsecond=654321)
112110
ts = Timestamp.from_date(original)
113111
result = ts.to_date()
114-
assert original.replace(microsecond=result.microsecond) == result
115-
112+
assert original == result
116113

117114
# plus_nanos() tests
118115

119-
120116
def test_plus_nanos_simple_add():
121117
"""Test simple addition of nanoseconds without overflow."""
122118
ts = Timestamp(1, 100)

0 commit comments

Comments
 (0)