RESOURCE_LOCK.rst 787 B

123456789101112131415161718
  1. RESOURCE_LOCK
  2. -------------
  3. Specify a list of resources that are locked by this test.
  4. If multiple tests specify the same resource lock, they are guaranteed
  5. not to run concurrently.
  6. See also :prop_test:`FIXTURES_REQUIRED` if the resource requires any setup or
  7. cleanup steps.
  8. Both the :prop_test:`PROCESSES` and ``RESOURCE_LOCK`` properties serve similar
  9. purposes, but they are distinct and orthogonal. Resources specified by
  10. :prop_test:`PROCESSES` do not affect ``RESOURCE_LOCK``, and vice versa. Whereas
  11. ``RESOURCE_LOCK`` is a simpler property that is used for locking one global
  12. resource, :prop_test:`PROCESSES` is a more advanced property that allows
  13. multiple tests to simultaneously use multiple resources of the same type,
  14. specifying their requirements in a fine-grained manner.