Reset global _yaml state between tests
- Dominant language
- Python
- Stars
- 140
- Forks
- 45
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 6
Description
[See original issue on GitLab](https://gitlab.com/BuildStream/buildstream/-/issues/1070)
In GitLab by [[Gitlab user @juergbi]](https://gitlab.com/juergbi) on Jul 9, 2019, 11:05
`_yaml.pyx` has two global variables `_FILE_LIST` and `__counter` that are not reset between tests. This may result in tests behaving differently when invoked individually and when running as part of the test suite. This may have been the reason why #1051 has not been noticed earlier.
We should reset global `_yaml.pyx` state between tests, possibly as part of `Context` cleanup.
Contributor guide
Research direction
Start by reading _yaml.pyx and the test cleanup flow around Context. Reproduce the difference between running tests individually and as part of the full suite, then determine where the global state should be reset. Done means tests no longer depend on execution order or prior tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100