Add a unit test function for overriding the environment.

Review Request #13070 — Created May 25, 2023 and updated

chipx86
RBTools
release-5.x
13068
rbtools

This introduces a TestCase.env context manager that takes in a
dictionary of new environment settings, sets them, and then unsets them
after the context is run.

Through this, we should be able to safely work with the environment
without tests having to take special care to reset state.

Made use of this in upcoming unit tests.

Summary
Add a unit test function for overriding the environment.
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
david
  1. Ship It!
  2. 
      
Loading...