mirror of
https://github.com/bspeice/dtparse
synced 2024-12-22 04:18:09 -05:00
Fix new tests not being date-neutral
This commit is contained in:
parent
246b389ac9
commit
b5fa1d89ef
@ -51,7 +51,7 @@ tests = {
|
|||||||
'2003-09-25T10:49:41-03:00', '20030925T104941.5-0300',
|
'2003-09-25T10:49:41-03:00', '20030925T104941.5-0300',
|
||||||
'20030925T104941-0300',
|
'20030925T104941-0300',
|
||||||
# dtparse-specific
|
# dtparse-specific
|
||||||
"10:00:00 UTC+3", "03:36:47 PM GMT-4", "04:15:00 AM Z-02:00"
|
"2018-08-10 10:00:00 UTC+3", "2018-08-10 03:36:47 PM GMT-4", "2018-08-10 04:15:00 AM Z-02:00"
|
||||||
],
|
],
|
||||||
'test_parse_dayfirst': [
|
'test_parse_dayfirst': [
|
||||||
'10-09-2003', '10.09.2003', '10/09/2003', '10 09 2003',
|
'10-09-2003', '10.09.2003', '10/09/2003', '10 09 2003',
|
||||||
|
@ -1442,7 +1442,7 @@ fn test_parse_offset5() {
|
|||||||
hour: 10, minute: 0, second: 0,
|
hour: 10, minute: 0, second: 0,
|
||||||
micros: 0, tzo: Some(-10800),
|
micros: 0, tzo: Some(-10800),
|
||||||
};
|
};
|
||||||
parse_and_assert(pdt, info, "10:00:00 UTC+3", None, None, false, false,
|
parse_and_assert(pdt, info, "2018-08-10 10:00:00 UTC+3", None, None, false, false,
|
||||||
None, false, &HashMap::new());
|
None, false, &HashMap::new());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1454,7 +1454,7 @@ fn test_parse_offset6() {
|
|||||||
hour: 15, minute: 36, second: 47,
|
hour: 15, minute: 36, second: 47,
|
||||||
micros: 0, tzo: Some(14400),
|
micros: 0, tzo: Some(14400),
|
||||||
};
|
};
|
||||||
parse_and_assert(pdt, info, "03:36:47 PM GMT-4", None, None, false, false,
|
parse_and_assert(pdt, info, "2018-08-10 03:36:47 PM GMT-4", None, None, false, false,
|
||||||
None, false, &HashMap::new());
|
None, false, &HashMap::new());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1466,7 +1466,7 @@ fn test_parse_offset7() {
|
|||||||
hour: 4, minute: 15, second: 0,
|
hour: 4, minute: 15, second: 0,
|
||||||
micros: 0, tzo: Some(7200),
|
micros: 0, tzo: Some(7200),
|
||||||
};
|
};
|
||||||
parse_and_assert(pdt, info, "04:15:00 AM Z-02:00", None, None, false, false,
|
parse_and_assert(pdt, info, "2018-08-10 04:15:00 AM Z-02:00", None, None, false, false,
|
||||||
None, false, &HashMap::new());
|
None, false, &HashMap::new());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -708,20 +708,20 @@ fn test_tokenize115() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_tokenize116() {
|
fn test_tokenize116() {
|
||||||
let comp = vec!["10", ":", "00", ":", "00", " ", "UTC", "+", "3"];
|
let comp = vec!["2018", "-", "08", "-", "10", " ", "10", ":", "00", ":", "00", " ", "UTC", "+", "3"];
|
||||||
tokenize_assert("10:00:00 UTC+3", comp);
|
tokenize_assert("2018-08-10 10:00:00 UTC+3", comp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_tokenize117() {
|
fn test_tokenize117() {
|
||||||
let comp = vec!["03", ":", "36", ":", "47", " ", "PM", " ", "GMT", "-", "4"];
|
let comp = vec!["2018", "-", "08", "-", "10", " ", "03", ":", "36", ":", "47", " ", "PM", " ", "GMT", "-", "4"];
|
||||||
tokenize_assert("03:36:47 PM GMT-4", comp);
|
tokenize_assert("2018-08-10 03:36:47 PM GMT-4", comp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_tokenize118() {
|
fn test_tokenize118() {
|
||||||
let comp = vec!["04", ":", "15", ":", "00", " ", "AM", " ", "Z", "-", "02", ":", "00"];
|
let comp = vec!["2018", "-", "08", "-", "10", " ", "04", ":", "15", ":", "00", " ", "AM", " ", "Z", "-", "02", ":", "00"];
|
||||||
tokenize_assert("04:15:00 AM Z-02:00", comp);
|
tokenize_assert("2018-08-10 04:15:00 AM Z-02:00", comp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user