Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-beedie committed Jan 28, 2025
1 parent d431593 commit 7b3f428
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
4 changes: 2 additions & 2 deletions crates/polars-sql/tests/simple_exprs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ fn test_literal_exprs() {
'foo' as string_lit,
true as bool_lit,
null as null_lit,
interval '1 quarter 2 weeks 1 day 50 seconds' as duration_lit
interval '2 weeks 1 day 50 seconds' as duration_lit
FROM df"#;
let df_sql = context.execute(sql).unwrap().collect().unwrap();
let df_pl = df
Expand All @@ -208,7 +208,7 @@ fn test_literal_exprs() {
lit("foo").alias("string_lit"),
lit(true).alias("bool_lit"),
lit(NULL).alias("null_lit"),
lit(Duration::parse("1q2w1d50s")).alias("duration_lit"),
lit(Duration::parse("2w1d50s")).alias("duration_lit"),
])
.collect()
.unwrap()
Expand Down
11 changes: 0 additions & 11 deletions crates/polars-time/src/windows/duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1123,15 +1123,4 @@ mod test {
let expected = "4w";
assert_eq!(format!("{duration}"), expected);
}

#[test]
fn test_equality() {
let d1 = Duration::parse("1w");
let d2 = Duration::parse("7d");
assert_eq!(d1, d2);

let d3 = Duration::parse_interval("2 months");
let d4 = Duration::parse_interval("8 weeks");
assert_ne!(d3, d4);
}
}

0 comments on commit 7b3f428

Please sign in to comment.