pegleg/src/bin/pegleg/tests
Felipe Monteiro 9c9bf61ee3 fixtures: Introduce fixture for auto-resetting config object
Autouse fixtures in pytest are a powerful way of executing a
fixture for each test. Since Pegleg uses a global in-memory
object for storing config info, this dictionary should be
cleaned up after each test to ensure test idempotency.

The best way (and cleanest) is to use an autouse fixture inside
a conftest.py which ensures that it is used after each and every
unit test [0].

[0] https://docs.pytest.org/en/latest/fixture.html#conftest-py-sharing-fixture-functions

Change-Id: I0c647d3d7547d1bdcd7c289a4c11159376f9f58d
2018-08-09 18:50:04 +00:00
..
unit fixtures: Introduce fixture for auto-resetting config object 2018-08-09 18:50:04 +00:00
__init__.py Allow linting policies to be selectable 2018-03-13 08:57:00 -05:00