Skip to content

Tests run directly in the testing directoryΒ #157

Closed
@jspaezp

Description

@jspaezp

When I was working on my PR, I noticed that tests run directly on the data directories within the tests directory (Im sorry for the complicated sentence). Or the file path is passed directly as an argument.

Since some of the functionality modifies the document in-place, I am suggesting adding two fixtures/helper functions.

  1. CloneFile
    2. copy the contents of a file to a temporary file.
  2. CloneDirectory
    1. Copies the contents of a directory to a temporary directory
    2. Changes the directory to that directory (monkeypatch it)

This would allow less boilerplate code on the tests, since it would automatically clean up any changes
that occur on the files (which might or might not be intended)

Use case ... if someone screws up coding and flips the "-write" parameter, it will not modify all the test files.

LMK what you think

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions