diff --git a/tests/lib/test_dump_load.py b/tests/lib/test_dump_load.py index c34f9ef8..8f6e36f9 100644 --- a/tests/lib/test_dump_load.py +++ b/tests/lib/test_dump_load.py @@ -4,6 +4,15 @@ def test_dump(verbose=False): assert yaml.dump(['foo']) test_dump.unittest = True +def test_load_no_loader(verbose=False): + try: + yaml.load("- foo\n") + except TypeError: + return True + assert(False, "load() require Loader=...") + +test_load_no_loader.unittest = True + def test_load_safeloader(verbose=False): assert yaml.load("- foo\n", Loader=yaml.SafeLoader) test_load_safeloader.unittest = True