Skip to content

Commit

Permalink
Brief documentation for safe_yaml=False
Browse files Browse the repository at this point in the history
Provide a note about how to get custom yaml types when loading
tests, to make sure that the availability of the functionality
is visible but not overtly recommended.
  • Loading branch information
cdent committed Nov 6, 2017
1 parent 12f36eb commit 14424cb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/source/loader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ build and run tests with pytest_ with some limitations described below.
.. note:: It is also possible to run gabbi tests from the command
line. See :doc:`runner`.

.. note:: By default gabbi will load YAML files using the ``safe_load``
function. This means only basic YAML types are allowed in the
file. For most use cases this is fine. If you need custom types
(for example, to match NaN) it is possible to set the ``safe_yaml``
parameter of :meth:`~gabbi.driver.build_tests` to ``False``.
If custom types are used, please keep in mind that this can limit
the portability of the YAML files to other contexts.

.. warning:: If test are being run with a runner that supports
concurrency (such as ``testrepository``) it is critical
that the test runner is informed of how to group the
Expand Down

0 comments on commit 14424cb

Please sign in to comment.