mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 05:25:17 +00:00
use owned ast and tokens in bench (#11598)
This commit is contained in:
parent
e14096f0a8
commit
921bc15542
3 changed files with 39 additions and 63 deletions
|
@ -353,10 +353,12 @@ mod tests {
|
|||
use insta::assert_debug_snapshot;
|
||||
use serde::de::DeserializeOwned;
|
||||
|
||||
#[cfg(not(windows))]
|
||||
use ruff_linter::registry::Linter;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[cfg(not(windows))]
|
||||
const VS_CODE_INIT_OPTIONS_FIXTURE: &str =
|
||||
include_str!("../../resources/test/fixtures/settings/vs_code_initialization_options.json");
|
||||
const GLOBAL_ONLY_INIT_OPTIONS_FIXTURE: &str =
|
||||
|
@ -368,7 +370,8 @@ mod tests {
|
|||
serde_json::from_str(content).expect("test fixture JSON should deserialize")
|
||||
}
|
||||
|
||||
#[cfg_attr(not(windows), test)]
|
||||
#[cfg(not(windows))]
|
||||
#[test]
|
||||
fn test_vs_code_init_options_deserialize() {
|
||||
let options: InitializationOptions = deserialize_fixture(VS_CODE_INIT_OPTIONS_FIXTURE);
|
||||
|
||||
|
@ -553,7 +556,8 @@ mod tests {
|
|||
"###);
|
||||
}
|
||||
|
||||
#[cfg_attr(not(windows), test)]
|
||||
#[cfg(not(windows))]
|
||||
#[test]
|
||||
fn test_vs_code_workspace_settings_resolve() {
|
||||
let options = deserialize_fixture(VS_CODE_INIT_OPTIONS_FIXTURE);
|
||||
let AllSettings {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue