Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor tests to use Python's tempfile for managing QR Code output #409

Open
@bartTC

Description

The current implementation of the render_tests is overly complex due to its dependency on mocking filesystem operations with mock.mock_open. The test verifies the creation of a QR code output file but relies on mock patching pathlib.Path.open and performing assertions on the mocked behaviors. This approach adds unnecessary complexity and tightly couples the test to mock.

Refactor the test to use Python's tempfile module to handle file creation and comparison. This adjustment will simplify the test, reduce reliance on mocking, and offer a more direct and clean approach to verifying the QR code's output.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /