This commit is contained in:
Elijah McMorris 2023-06-30 00:57:27 +00:00
parent 41bd1e8fe7
commit ffb24e7943
Signed by: NexVeridian
SSH key fingerprint: SHA256:bsA1SKZxuEcEVHAy3gY1HUeM5ykRJl0U0kQHQn0hMg8
6 changed files with 93 additions and 81 deletions

View file

@ -15,18 +15,22 @@ fn get_api_arkk() -> Result<(), Box<dyn Error>> {
.get_api(NaiveDate::from_ymd_opt(2023, 5, 18))?
.collect()?;
assert_eq!(
df.get_column_names(),
[
"company",
"cusip",
"date",
"market_value",
"share_price",
"shares",
"ticker",
"weight"
]
let expected = [
"company",
"cusip",
"date",
"market_value",
"share_price",
"shares",
"ticker",
"weight",
"weight_rank",
];
let actual = df.get_column_names();
assert!(
actual == expected || actual == expected[..expected.len() - 1],
"Column names are wrong"
);
Ok(())
}