strictyaml icon indicating copy to clipboard operation
strictyaml copied to clipboard

Needs tests

Open julie777 opened this issue 2 years ago • 10 comments

Feel free to raise an issue for any of the following:

  • Feature request

There are no tests in the repository

julie777 avatar Feb 25 '22 17:02 julie777

The tests are in the hitch/story directory, you can read about running them here https://hitchdev.com/approach/contributing/

jnichols0 avatar Mar 04 '22 00:03 jnichols0

The tests are in the hitch/story directory, you can read about running them here https://hitchdev.com/approach/contributing/

Thanks. I never thought of looking in a different repo for them.

I am going to need to study hitchstory. I have substantial experience using behave for BDD. I am curious to see the changes.

julie777 avatar Mar 04 '22 01:03 julie777

Is there a simple way how to run tests for this project? Thank you.

mtelka avatar Apr 21 '23 16:04 mtelka

Yes, apologies I let the original instructions get out of date. I'll update them tonight.

On Fri, 21 Apr 2023, 17:22 Marcel Telka, @.***> wrote:

Is there a simple way how to run tests for this project? Thank you.

— Reply to this email directly, view it on GitHub https://github.com/crdoconnor/strictyaml/issues/168#issuecomment-1518063073, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOJKNOASFRZBENVGCAIK43XCKX3TANCNFSM5PK4XZOQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

crdoconnor avatar Apr 21 '23 17:04 crdoconnor

The updated instructions are visible here: https://hitchdev.com/approach/contributing/

crdoconnor avatar Apr 21 '23 18:04 crdoconnor

Thank you. That looks easy. If I read the URL properly just ./key.sh make followed by ./key.sh regression should be run to test strictyaml. If that's the case then I think you could create simple tox.ini file to have both commands run by tox which is currently the preferred way how to run tests uniformly for most Python projects.

mtelka avatar Apr 21 '23 19:04 mtelka

As I understand it tox is just a different way of creating virtual environments, etc. to run tests in. This is something the code run by key.sh already does. It also containerizes the running code to ensure for greater consistency, which tox can't and doesn't do.

crdoconnor avatar Apr 21 '23 21:04 crdoconnor

Not only that. tox could be used also with current environment (as opposed to virtualized or containerized env) using the tox-current-env plugin. This is exactly what is needed for downstream packagers like me. I'm packaging strictyaml (and many other Python projects) for OpenIndiana and we need to run tests in current environment to make sure the built package will work as expected and designed.

mtelka avatar Apr 21 '23 21:04 mtelka

ah, fair enough.

if I wrote a separate script that runs the tests in the environment the script is run in would that suffice?

On Fri, 21 Apr 2023, 22:34 Marcel Telka, @.***> wrote:

Not only that. tox could be used also with current environment (as opposed to virtualized or containerized env) using the tox-current-env plugin. This is exactly what is needed for downstream packagers like me. I'm packaging strictyaml (and many other Python projects) for OpenIndiana and we need to run tests in current environment to make sure the built package will work as expected and designed.

— Reply to this email directly, view it on GitHub https://github.com/crdoconnor/strictyaml/issues/168#issuecomment-1518354572, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOJKNPV5UY5EV3CKBRBSN3XCL4MRANCNFSM5PK4XZOQ . You are receiving this because you commented.Message ID: @.***>

crdoconnor avatar Apr 21 '23 22:04 crdoconnor

if I wrote a separate script that runs the tests in the environment the script is run in would that suffice?

Sounds reasonable.

mtelka avatar Apr 21 '23 22:04 mtelka