ITADN

Switch tests to use to `TestItems.jl` for easier integration with IDEs and other advanced tests runners

#443ClosedKrastanov 创建于 2025-05-19
K
Krastanovcommented
Like any modern language, Julia supports running unit tests as part of the dev workflow. In this package they are in the `test` folder and can be executed by going to package mode and running `] test QuantumOptics`. They are build with the `Test` standard library. There are testing harness libraries that have been build on top of it, providing many additional features. `TestItems` in particular makes it much easier to run tests in parallel, it integrates with various IDEs, and provides other nice features. ### This bounty is about packaging all of the tests in QuantumOptics and QuantumOpticsBase as `TestItems` tests. The conversion is fairly straightforward: For each test file, wrap it in `@testitem "description" ... end`. It would be best to **not** change any other indentation in that file, so that the diffs shown in the eventual PR are simple and easy to review. Modify the `runtests.jl` file to be much simpler than it currently is, and to use the `TestItems` runner. The Project.toml file will need minor modifications to add the test dependencies on `TestItems` You can consult other libraries in this same ecosystem to see how straightforward the change is, e.g. https://github.com/QuantumSavory/QuantumClifford.jl/tree/master/test To complete this bounty: - A PR for QuantumOptics that performs the aforementioned conversion and has all tests passing and no lost tests - A PR for QuantumOpticsBase that performs the aforementioned conversion and has all tests passing and no lost tests - there might be some minor back-and-forth on editing ENV variables to make sure that tests are filtered properly by the CI runners (see how it is done in QuantumClifford.jl) - both PRs need to be approved and merged for the bounty to be awarded If you are new to julia, make sure to: - install julia using `juliaup` for version management - look through the [julia manual](https://docs.julialang.org/en/v1/) and [modern workflows](https://modernjuliaworkflows.org/) - try out VSCode with the [Julia plugin](https://www.julia-vscode.org/) for good IDE support
关闭于 2025-06-02 4 条评论