Skip to content

Conversation

Kriskras99
Copy link
Contributor

@Kriskras99 Kriskras99 commented Aug 11, 2025

This refactor splits a unit test into two integration tests as it's no longer possible to overwrite SERDE_HUMAN_READABLE after it has been set. By splitting it into two integration tests, they don't share global state and can thus modify it for the test.

I've also removed the unit tests that test that the Serializer/ Deserializer correctly use SERDE_HUMAN_READABLE for their is_human_readable implementation as these structs are not accessible from a integration test. I've kept the half of the tests that test for SERDE_HUMAN_READABLE == true. If this implementation is ever changed it will also affect the integration tests so it's still being tested.

Closes #253

This refactor splits a unit test into two integration tests as it's
no longer possible to overwrite `SERDE_HUMAN_READABLE` after it has
been set. By splitting it into two integration tests, they don't
share global state and can thus modify it for the test.

I've also removed the unit tests that test that the `Serializer`/
`Deserializer` correctly use `SERDE_HUMAN_READABLE` for their
`is_human_readable` implementation as these structs are not accessible
from a integration test. I've kept the half of the tests that test
for `SERDE_HUMAN_READABLE == true`. If this implementation is ever
changed it will also affect the integration tests so it's still being
tested.
@martin-g
Copy link
Member

It will be hard for me to merge/rebase this to #246 :-/
Shall we freeze such refactorings until we are ready with the async-ification (i.e. until we merge mine PR or your PR or neither) ?

@Kriskras99
Copy link
Contributor Author

Yeah that's fine. I just noticed it while yakshaving for the state machines implentation. I'll keep the PR open and it can rebase on whatever we plan to merge.

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.

Unnecessary use of Once?
2 participants