summaryrefslogtreecommitdiff
path: root/rust/tests/component.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-02-26 20:56:18 -0500
committerMason Reed <mason@vector35.com>2025-02-26 21:05:34 -0500
commitdc8015f6695ee069279dfbd681000e8b1fcd30e5 (patch)
treec1e387c68a249ff90999bbdcc4fa90372516d88c /rust/tests/component.rs
parent4608523101738492124069765324141966372229 (diff)
Remove module level `Session` initialization in Rust unit tests
This was preventing the enterprise license checkout from dropping, also the initialization story is much better than it was when we added the rstest fixtures, we can get away with initialization in parallel more broadly.
Diffstat (limited to 'rust/tests/component.rs')
-rw-r--r--rust/tests/component.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/rust/tests/component.rs b/rust/tests/component.rs
index c57785ce..3341f0d7 100644
--- a/rust/tests/component.rs
+++ b/rust/tests/component.rs
@@ -1,17 +1,11 @@
use binaryninja::binary_view::BinaryViewExt;
use binaryninja::component::ComponentBuilder;
use binaryninja::headless::Session;
-use rstest::*;
use std::path::PathBuf;
-#[fixture]
-#[once]
-fn session() -> Session {
- Session::new().expect("Failed to initialize session")
-}
-
-#[rstest]
-fn test_component_creation(_session: &Session) {
+#[test]
+fn test_component_creation() {
+ let _session = Session::new().expect("Failed to initialize session");
let out_dir = env!("OUT_DIR").parse::<PathBuf>().unwrap();
let view = binaryninja::load(out_dir.join("atox.obj")).expect("Failed to create view");
let component = ComponentBuilder::new(view.clone()).name("test").finalize();