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

some test_round_trip tests fail because of missing object constructors #25

Open
mcepl opened this issue Apr 10, 2019 · 0 comments
Open

Comments

@mcepl
Copy link

mcepl commented Apr 10, 2019

test_round_trip[data1], test_round_trip[data2], and test_round_trip[data4] fail when building experimentator 0.3.1 with PyYAML 5.1 on openSUSE/Tumbleweed and with Python 3.

Complete build log shows all dependencies and process of build.

[   97s] =================================== FAILURES ===================================
[   97s] ____________________________ test_round_trip[data1] ____________________________
[   97s]
[   97s] data = (1+1j)
[   97s]
[   97s]     @pytest.mark.parametrize('data', [
[   97s]         np.random.randn(5),
[   97s]         1+1j,
[   97s]         np.array([1, 1+1j, 1j]),
[   97s]         np.arange(200, 220),
[   97s]         make_heterogeneous_tree(),
[   97s]     ])
[   97s]     def test_round_trip(data):
[   97s] >       cmp = yaml.load(yaml.dump(data)) == data
[   97s]
[   97s] tests/test_yaml.py:16:
[   97s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[   97s] /usr/lib64/python3.7/site-packages/yaml/__init__.py:114: in load
[   97s]     return loader.get_single_data()
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:43: in get_single_data
[   97s]     return self.construct_document(node)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:47: in construct_document
[   97s]     data = self.construct_object(node)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:92: in construct_object
[   97s]     data = constructor(self, node)
[   97s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[   97s]
[   97s] self = <yaml.loader.FullLoader object at 0x7f0cde3032b0>
[   97s] node = ScalarNode(tag='!complex', value='1+1j')
[   97s]
[   97s]     def construct_undefined(self, node):
[   97s]         raise ConstructorError(None, None,
[   97s]                 "could not determine a constructor for the tag %r" % node.tag,
[   97s] >               node.start_mark)
[   97s] E       yaml.constructor.ConstructorError: could not determine a constructor for the tag '!complex'
[   97s] E         in "<unicode string>", line 1, column 1:
[   97s] E           !complex '1+1j'
[   97s] E           ^
[   97s]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:420: ConstructorError
[   97s] ____________________________ test_round_trip[data2] ____________________________
[   97s]
[   97s] data = array([1.+0.j, 1.+1.j, 0.+1.j])
[   97s]
[   97s]     @pytest.mark.parametrize('data', [
[   97s]         np.random.randn(5),
[   97s]         1+1j,
[   97s]         np.array([1, 1+1j, 1j]),
[   97s]         np.arange(200, 220),
[   97s]         make_heterogeneous_tree(),
[   97s]     ])
[   97s]     def test_round_trip(data):
[   97s] >       cmp = yaml.load(yaml.dump(data)) == data
[   97s]
[   97s] tests/test_yaml.py:16:
[   97s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[   97s] /usr/lib64/python3.7/site-packages/yaml/__init__.py:114: in load
[   97s]     return loader.get_single_data()
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:43: in get_single_data
[   97s]     return self.construct_document(node)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:52: in construct_document
[   97s]     for dummy in generator:
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:399: in construct_yaml_seq
[   97s]     data.extend(self.construct_sequence(node))
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:122: in construct_sequence
[   97s]     for child in node.value]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:122: in <listcomp>
[   97s]     for child in node.value]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:92: in construct_object
[   97s]     data = constructor(self, node)
[   97s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[   97s]
[   97s] self = <yaml.loader.FullLoader object at 0x7f0cde329b00>
[   97s] node = ScalarNode(tag='!complex', value='1+0j')
[   97s]
[   97s]     def construct_undefined(self, node):
[   97s]         raise ConstructorError(None, None,
[   97s]                 "could not determine a constructor for the tag %r" % node.tag,
[   97s] >               node.start_mark)
[   97s] E       yaml.constructor.ConstructorError: could not determine a constructor for the tag '!complex'
[   97s] E         in "<unicode string>", line 1, column 3:
[   97s] E           - !complex '1+0j'
[   97s] E             ^
[   97s]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:420: ConstructorError
[   97s] ____________________________ test_round_trip[data4] ____________________________
[   97s]
[   97s] data = <experimentator.design.DesignTree object at 0x7f0cde688390>
[   97s]
[   97s]     @pytest.mark.parametrize('data', [
[   97s]         np.random.randn(5),
[   97s]         1+1j,
[   97s]         np.array([1, 1+1j, 1j]),
[   97s]         np.arange(200, 220),
[   97s]         make_heterogeneous_tree(),
[   97s]     ])
[   97s]     def test_round_trip(data):
[   97s] >       cmp = yaml.load(yaml.dump(data)) == data
[   97s]
[   97s] tests/test_yaml.py:16:
[   97s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[   97s] /usr/lib64/python3.7/site-packages/yaml/__init__.py:114: in load
[   97s]     return loader.get_single_data()
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:43: in get_single_data
[   97s]     return self.construct_document(node)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:52: in construct_document
[   97s]     for dummy in generator:
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:399: in construct_yaml_seq
[   97s]     data.extend(self.construct_sequence(node))
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:122: in construct_sequence
[   97s]     for child in node.value]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:122: in <listcomp>
[   97s]     for child in node.value]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:94: in construct_object
[   97s]     data = constructor(self, tag_suffix, node)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:635: in construct_python_object_new
[   97s]     return self.construct_python_object_apply(suffix, node, newobj=True)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:612: in construct_python_object_apply
[   97s]     args = self.construct_sequence(node, deep=True)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:122: in construct_sequence
[   97s]     for child in node.value]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:122: in <listcomp>
[   97s]     for child in node.value]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:99: in construct_object
[   97s]     for dummy in generator:
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:399: in construct_yaml_seq
[   97s]     data.extend(self.construct_sequence(node))
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:122: in construct_sequence
[   97s]     for child in node.value]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:122: in <listcomp>
[   97s]     for child in node.value]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:99: in construct_object
[   97s]     for dummy in generator:
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:596: in construct_python_object
[   97s]     state = self.construct_mapping(node, deep=deep)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:210: in construct_mapping
[   97s]     return super().construct_mapping(node, deep=deep)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:135: in construct_mapping
[   97s]     value = self.construct_object(value_node, deep=deep)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:99: in construct_object
[   97s]     for dummy in generator:
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:596: in construct_python_object
[   97s]     state = self.construct_mapping(node, deep=deep)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:210: in construct_mapping
[   97s]     return super().construct_mapping(node, deep=deep)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:135: in construct_mapping
[   97s]     value = self.construct_object(value_node, deep=deep)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:99: in construct_object
[   97s]     for dummy in generator:
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:399: in construct_yaml_seq
[   97s]     data.extend(self.construct_sequence(node))
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:122: in construct_sequence
[   97s]     for child in node.value]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:122: in <listcomp>
[   97s]     for child in node.value]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:99: in construct_object
[   97s]     for dummy in generator:
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:404: in construct_yaml_map
[   97s]     value = self.construct_mapping(node)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:210: in construct_mapping
[   97s]     return super().construct_mapping(node, deep=deep)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:135: in construct_mapping
[   97s]     value = self.construct_object(value_node, deep=deep)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:94: in construct_object
[   97s]     data = constructor(self, tag_suffix, node)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:612: in construct_python_object_apply
[   97s]     args = self.construct_sequence(node, deep=True)
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:122: in construct_sequence
[   97s]     for child in node.value]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:122: in <listcomp>
[   97s]     for child in node.value]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:92: in construct_object
[   97s]     data = constructor(self, node)
[   97s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[   97s]
[   97s] self = <yaml.loader.FullLoader object at 0x7f0cde303438>
[   97s] node = ScalarNode(tag='!dtype', value='str256')
[   97s]
[   97s]     def construct_undefined(self, node):
[   97s]         raise ConstructorError(None, None,
[   97s]                 "could not determine a constructor for the tag %r" % node.tag,
[   97s] >               node.start_mark)
[   97s] E       yaml.constructor.ConstructorError: could not dlCoetermine a constructor for the tag '!dtype'
[   97s] E         in "<unicode string>", line 203, column 13:
[   97s] E                     - !dtype 'str256'
[   97s] E                       ^
[   97s]
[   97s] /usr/lib64/python3.7/site-packages/yaml/constructor.py:420: ConstructorError
[   97s] ============ 3 failed, 1336 passed, 1341 warnings in 63.00 seconds =============
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

1 participant