Skip to content

Conversation

hyperupcall
Copy link
Collaborator

@hyperupcall hyperupcall commented Nov 29, 2024

This supersedes #1170. As mentioned in the issue that the PR links to, the testing suite is being converted from Pytest to Bash, mostly due to Pytest's poor support for Bash codecov.

I changed the formatting for files in bats/ because they use a lot of heredocs for improved readability of the stdout content assertions. According to the Bash manual (emphasis mine):

If the redirection operator is <<-, then all leading tab characters are stripped from input lines and the line containing delimiter. This allows here documents within shell scripts to be indented in a natural fashion.

This adds the first half of tests just to get things started. The suite can be ran with:

bats ./tests

In another PR, I'll rewrite the other half of tests, add documentation, and eventually remove the pytest stuff.

For a more detailed explanation of functions and commands (for those not as familiar with Bats), #1170 contains very verbose details in comments

Copy link
Collaborator

@spacewander spacewander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a job in the CI to run the bats test? For now, we can run both py and shell until everything is done.

@vanpipy
Copy link
Collaborator

vanpipy commented Dec 3, 2024

Great! pls replace the ci


with the bats, that makes everything done easily.

@hyperupcall
Copy link
Collaborator Author

hyperupcall commented Mar 7, 2025

It's done! :)

cc @vanpipy

@hyperupcall hyperupcall requested a review from spacewander March 7, 2025 08:48
Copy link
Collaborator

@spacewander spacewander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hyperupcall
Copy link
Collaborator Author

hyperupcall commented Mar 10, 2025

Interestingly, GitHub doesn't clearly show that CI failed to run! It shows all green for me and the only difference is the omission of the "All checks have passed" text. I guess this is part of the new pull request status box they recently rolled out...

I made those changes 👍

@spacewander spacewander merged commit 18ecffe into tj:main Mar 12, 2025
5 checks passed
@spacewander
Copy link
Collaborator

Merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants