mirror of
https://github.com/openai/codex.git
synced 2026-05-03 12:52:11 +03:00
add python toolchain for datamodel-code-generator
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use codex_app_server_protocol::generate_json_with_experimental;
|
||||
use codex_app_server_protocol::generate_python_with_experimental;
|
||||
use codex_app_server_protocol::generate_typescript_schema_fixture_subtree_for_tests;
|
||||
use codex_app_server_protocol::read_schema_fixture_subtree;
|
||||
use similar::TextDiff;
|
||||
@@ -27,6 +28,13 @@ fn json_schema_fixtures_match_generated() -> Result<()> {
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn python_schema_fixtures_match_generated() -> Result<()> {
|
||||
assert_schema_fixtures_match_generated("python", |output_dir| {
|
||||
generate_python_with_experimental(output_dir, false)
|
||||
})
|
||||
}
|
||||
|
||||
fn assert_schema_fixtures_match_generated(
|
||||
label: &'static str,
|
||||
generate: impl FnOnce(&Path) -> Result<()>,
|
||||
|
||||
Reference in New Issue
Block a user