framework: make options a global variable

Graphics / Mesa 3D Graphics Library / Piglit - Dylan Baker [gmail.com] - 11 November 2015 17:15 UTC

This changes the behavior of the Options class. Instead of being an instance that's passed around, it's now treated as a global variable (or as close to one as python gets to having globals), anyone who needs it goes and gets it out of the options namespace and uses it.

This patch does a lot of refactoring work that is needed to ensure that Options continues to work as it did before (where it was mostly initialized and then passed around), This includes a significant amount of testing for the new code around Options.

v2: - fix spelling in comments and docstrings- Fix _ReList docstring, which was _ReListDescriptor's docstring- Fix _ReList.__compile to ensure RegexObject.flags was correct- Add docstring to _ReList.__compile- Add __delete__ to _ReListDescriptor as NotImplementedError, this is just a completeness issue- Add/update tests for these changes- Remove duplicate addition of 'mock' to tox.ini

6f32e3f framework: make options a global variable.
framework/options.py | 202 ++++++++++++++++++++++++++++++++++++++
framework/tests/options_tests.py | 187 +++++++++++++++++++++++++++++++++++
2 files changed, 389 insertions(+)

Upstream: cgit.freedesktop.org


  • Share