Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure with PyYAML 5.4.1 #95

Closed
dotlambda opened this issue Jan 25, 2021 · 4 comments
Closed

Test failure with PyYAML 5.4.1 #95

dotlambda opened this issue Jan 25, 2021 · 4 comments
Assignees

Comments

@dotlambda
Copy link

============================= test session starts ==============================
platform linux -- Python 3.8.7, pytest-6.1.2, py-1.9.0, pluggy-0.13.1
rootdir: /build/ddt-1.4.1
collected 18 items / 1 error / 17 selected

==================================== ERRORS ====================================
____________________ ERROR collecting test/test_example.py _____________________
test/test_example.py:153: in <module>
    class YamlOnlyTestCase(unittest.TestCase):
ddt.py:372: in ddt
    return wrapper(arg) if inspect.isclass(arg) else wrapper
ddt.py:366: in wrapper
    process_file_data(cls, name, func, file_attr)
ddt.py:254: in process_file_data
    data = yaml.load(f, Loader=yaml_loader)
/nix/store/lpl17r5zrayqvxflsiylwjxzz7wb04n6-python3.8-PyYAML-5.4.1/lib/python3.8/site-packages/yaml/__init__.py:114: in load
    return loader.get_single_data()
/nix/store/lpl17r5zrayqvxflsiylwjxzz7wb04n6-python3.8-PyYAML-5.4.1/lib/python3.8/site-packages/yaml/constructor.py:51: in get_single_data
    return self.construct_document(node)
/nix/store/lpl17r5zrayqvxflsiylwjxzz7wb04n6-python3.8-PyYAML-5.4.1/lib/python3.8/site-packages/yaml/constructor.py:60: in construct_document
    for dummy in generator:
/nix/store/lpl17r5zrayqvxflsiylwjxzz7wb04n6-python3.8-PyYAML-5.4.1/lib/python3.8/site-packages/yaml/constructor.py:413: in construct_yaml_map
    value = self.construct_mapping(node)
/nix/store/lpl17r5zrayqvxflsiylwjxzz7wb04n6-python3.8-PyYAML-5.4.1/lib/python3.8/site-packages/yaml/constructor.py:218: in construct_mapping
    return super().construct_mapping(node, deep=deep)
/nix/store/lpl17r5zrayqvxflsiylwjxzz7wb04n6-python3.8-PyYAML-5.4.1/lib/python3.8/site-packages/yaml/constructor.py:143: in construct_mapping
    value = self.construct_object(value_node, deep=deep)
/nix/store/lpl17r5zrayqvxflsiylwjxzz7wb04n6-python3.8-PyYAML-5.4.1/lib/python3.8/site-packages/yaml/constructor.py:100: in construct_object
    data = constructor(self, node)
/nix/store/lpl17r5zrayqvxflsiylwjxzz7wb04n6-python3.8-PyYAML-5.4.1/lib/python3.8/site-packages/yaml/constructor.py:427: in construct_undefined
    raise ConstructorError(None, None,
E   yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/object:test.test_example.MyClass'
E     in "/build/ddt-1.4.1/test/data/test_custom_yaml_loader.yaml", line 36, column 13
=============================== warnings summary ===============================
ddt.py:43
  /build/ddt-1.4.1/ddt.py:43: PytestCollectionWarning: cannot collect test class 'TestNameFormat' because it has a __new__ constructor (from: test/test_functional.py)
    class TestNameFormat(Enum):

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
ERROR test/test_example.py - yaml.constructor.ConstructorError: could not det...
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
========================= 1 warning, 1 error in 0.51s ==========================
@MeggyCal
Copy link

will be fixed by #96

@wswld
Copy link
Contributor

wswld commented Mar 12, 2021

#96 was merged, I will make a release later today.

@wswld
Copy link
Contributor

wswld commented Mar 12, 2021

@dotlambda @MeggyCal should be resolved in version 1.4.2

@wswld wswld closed this as completed Mar 12, 2021
@wswld wswld self-assigned this Mar 12, 2021
@MeggyCal
Copy link

thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants