Skip to content

Commit

Permalink
chore(blockifier): use suggested function to get dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ArniStarkware committed Nov 26, 2024
1 parent 9617c00 commit dc43bfc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/blockifier/src/versioned_constants_test.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use glob::{glob, Paths};
use pretty_assertions::assert_eq;
use starknet_api::test_utils::path_in_resources;

use super::*;

Expand All @@ -8,7 +9,8 @@ use super::*;

/// Returns all JSON files in the resources directory (should be all versioned constants files).
fn all_jsons_in_dir() -> Paths {
glob(format!("{}/resources/*.json", env!("CARGO_MANIFEST_DIR")).as_str()).unwrap()
let pattern = path_in_resources("");
glob(format!("{}/*.json", pattern.display()).as_str()).unwrap()
}

#[test]
Expand Down
1 change: 1 addition & 0 deletions crates/starknet_api/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub mod deploy_account;
pub mod invoke;
pub mod l1_handler;

// TODO(Arni): Consider moving this to infra utils under test utils.
/// Returns the path to a file in the resources directory. This assumes the current working
/// directory has a `resources` folder. The value for file_path should be the path to the required
/// file in the folder "resources".
Expand Down

0 comments on commit dc43bfc

Please sign in to comment.