Skip to content

[maintainability] LocalSimulatorDriverTest and AwsBraketDriverTest repeat identical scenario titles for shared base-class behavior #64

Description

@corgab

Summary

tests/Unit/Drivers/LocalSimulatorDriverTest.php and tests/Unit/Drivers/AwsBraketDriverTest.php each independently re-test behavior that actually lives in the shared AbstractQuantumDriver base class, under matching titles and separate per-driver setup — confirmed duplicated titles include 'implements QuantumDevice interface' (local:61, aws:51), 'implements AsynchronousDevice interface' (local:152, aws:241), and 'returns correct byte length from generateEntropy' (local:127, aws:145).

Where

  • tests/Unit/Drivers/LocalSimulatorDriverTest.php:61,127,152
  • tests/Unit/Drivers/AwsBraketDriverTest.php:51,145,241

Refactor proposal

For scenarios that only exercise AbstractQuantumDriver behavior common to every driver (interface conformance, byte-length correctness of generateEntropy()'s output), either (a) run them once via a Pest dataset parameterized over both concrete driver instances, or (b) test them once against a minimal test-only driver subclass of AbstractQuantumDriver and let the per-driver test files focus only on genuinely driver-specific behavior (AWS's synchronous_safe/cost-ceiling checks, local's cache-based task simulation).

Severity: low

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions