- Fixed import sorting in cli.py, __main__.py, detectors/__init__.py, base.py, python.py, rust.py, openapi.py, models/__init__.py - Removed unused imports (sys, asyncio, Observer, Text, Parameter, ParameterIn, HTTPMethod, DocConfig, List, Optional) - Removed trailing whitespace from blank lines - Split lines exceeding 100 characters - Added missing __init__ docstrings in generators and static/templates packages
This commit is contained in:
@@ -1,19 +1,18 @@
|
||||
"""Integration tests for documentation generation."""
|
||||
{"""Integration tests for documentation generation."""
|
||||
|
||||
import pytest
|
||||
import json
|
||||
import tempfile
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from docgen.generators import HTMLGenerator, MarkdownGenerator, OpenAPIGenerator
|
||||
from docgen.models import DocConfig, Endpoint, HTTPMethod, Parameter, ParameterIn
|
||||
|
||||
|
||||
class TestHTMLGeneration:
|
||||
"""Tests for HTML documentation generation."""
|
||||
|
||||
def test_html_generator_basic(self):
|
||||
"""Test basic HTML generation."""
|
||||
from docgen.models import Endpoint, HTTPMethod, DocConfig
|
||||
from docgen.generators import HTMLGenerator
|
||||
|
||||
endpoints = [
|
||||
Endpoint(
|
||||
path="/api/users",
|
||||
@@ -46,9 +45,6 @@ class TestHTMLGeneration:
|
||||
|
||||
def test_html_generator_grouped_endpoints(self):
|
||||
"""Test endpoint grouping in HTML."""
|
||||
from docgen.models import Endpoint, HTTPMethod, DocConfig
|
||||
from docgen.generators import HTMLGenerator
|
||||
|
||||
endpoints = [
|
||||
Endpoint(
|
||||
path="/users",
|
||||
@@ -75,9 +71,6 @@ class TestMarkdownGeneration:
|
||||
|
||||
def test_markdown_generator_basic(self):
|
||||
"""Test basic Markdown generation."""
|
||||
from docgen.models import Endpoint, HTTPMethod, DocConfig
|
||||
from docgen.generators import MarkdownGenerator
|
||||
|
||||
endpoints = [
|
||||
Endpoint(
|
||||
path="/api/users",
|
||||
@@ -109,10 +102,6 @@ class TestOpenAPIGeneration:
|
||||
|
||||
def test_openapi_generator_basic(self):
|
||||
"""Test basic OpenAPI generation."""
|
||||
from docgen.models import Endpoint, HTTPMethod, DocConfig, Parameter, ParameterIn
|
||||
from docgen.generators import OpenAPIGenerator
|
||||
import json
|
||||
|
||||
param = Parameter(
|
||||
name="id",
|
||||
type="integer",
|
||||
|
||||
Reference in New Issue
Block a user