Replace std::env::temp_dir with tempdir in tests (#8103)
* std::env::temp_dir -> tempdir in test context * fix lifetime issue so tempdir removes tmpfiles
This commit is contained in:
committed by
Marek Kotewicz
parent
7e948a088f
commit
23fc5517b5
@@ -59,9 +59,11 @@ mod difficulty_test_byzantium {
|
||||
|
||||
mod difficulty_test_foundation {
|
||||
use super::json_difficulty_test;
|
||||
use tempdir::TempDir;
|
||||
|
||||
fn do_json_test(json_data: &[u8]) -> Vec<String> {
|
||||
json_difficulty_test(json_data, ::ethereum::new_foundation(&::std::env::temp_dir()))
|
||||
let tempdir = TempDir::new("").unwrap();
|
||||
json_difficulty_test(json_data, ::ethereum::new_foundation(&tempdir.path()))
|
||||
}
|
||||
|
||||
declare_test!{DifficultyTests_difficultyMainNetwork, "BasicTests/difficultyMainNetwork.json"}
|
||||
|
||||
Reference in New Issue
Block a user