Skip to content

Commit ed16dae

Browse files
committed
Tests for date and datetime object passing
1 parent 66f16cc commit ed16dae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

t/date.t

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ use Inline::Python;
55

66
use Test;
77

8-
plan 1;
8+
plan 2;
99

1010
my $py = Inline::Python.new;
1111
$py.run: 'import datetime';
1212
my $py_date = $py.call('datetime', 'date', 2017, 3, 1);
1313

14-
is $py_date.isoformat.decode, '2017-03-01';
14+
is $py_date.isoformat.decode, '2017-03-01', 'can marshall datetime.date object';
15+
16+
my $py_datetime = $py.call('datetime', 'datetime', 2017, 3, 1, 10, 7, 5);
17+
18+
is $py_datetime.isoformat.decode, '2017-03-01T10:07:05', 'datetime.datetime';

0 commit comments

Comments
 (0)