Skip to content

Commit

Permalink
test: fix doctests for windows – different path descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
hollandjg committed Nov 30, 2023
1 parent 1ba0f9f commit 403aeb8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/autora/serializer/__init__.py
Original file line number Diff line number Diff line change
@@ -58,21 +58,20 @@ def load_serializer(
Examples:
The default serializer is pickle:
>>> load_serializer() # doctest: +ELLIPSIS
LOADED_SERIALIZER(module=<module 'pickle' from '.../pickle.py'>, file_mode='b')
LOADED_SERIALIZER(module=<module 'pickle' from '...'>, file_mode='b')
All supported serializers can be loaded explictly:
>>> p_ = load_serializer("pickle")
>>> p_ # doctest: +ELLIPSIS
LOADED_SERIALIZER(module=<module 'pickle' from '.../pickle.py'>, file_mode='b')
LOADED_SERIALIZER(module=<module 'pickle' from '...'>, file_mode='b')
>>> d_ = load_serializer("dill")
>>> d_ # doctest: +ELLIPSIS
LOADED_SERIALIZER(module=<module 'dill' from '...dill/__init__.py'>, file_mode='b')
LOADED_SERIALIZER(module=<module 'dill' from '...'>, file_mode='b')
>>> y_ = load_serializer("yaml")
>>> y_ # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
LOADED_SERIALIZER(module=<module 'autora.serializer.yaml_'
from '.../autora/serializer/yaml_.py'>, file_mode='')
>>> y_ # doctest: +ELLIPSIS
LOADED_SERIALIZER(module=<module 'autora.serializer.yaml_' from '...'>, file_mode='')
Note that the yaml serializer is a wrapped version of the `pyyaml` package,
which conforms to the same interface as `pickle`.

0 comments on commit 403aeb8

Please sign in to comment.