You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/units/playbook
Adrian Likins d6e2f1846a add a unit test for playbook/base.py (#17688)
* wip: add a unit test for playbook/base.py

This commit include a failing test
TestBaseSubClass.test_attr_class_post_validate

It fails with the error:
Traceback (most recent call last):
  File "/home/adrian/src/ansible/test/units/playbook/test_base.py", line 264, in test_attr_class_post_validate
    bsc = self._base_validate(ds)
  File "/home/adrian/src/ansible/test/units/playbook/test_base.py", line 206, in _base_validate
    bsc.post_validate(templar)
  File "/home/adrian/src/ansible/lib/ansible/playbook/base.py", line 450, in post_validate
    " Error was: %s" % (name, value, attribute.isa, e), obj=self.get_ds())
AnsibleParserError: the field 'test_attr_class_post_validate' has an invalid value (<class 'units.playbook.test_base.ExampleSubClass'>), and could not be converted to an class. Error was: test_attr_class_post_validate is not a valid <class 'units.playbook.test_base.ExampleSubClass'> (got a <class 'ansible.playbook.base.BaseMeta'> instead)

* wip, test refactoring

* wip, trying to add a parent->child

* wip, fix isa=class.

the ds the base using needs an instance of the class
(ie, whats normally created by the yaml loaders)

* wip, theres no need to argue, I just dont understand parents

* stub a _preprocess_data for coverage

* cleanup, required, parent, etc
8 years ago
..
role Make sure include_role inherit variables from parent role (#18627) 8 years ago
__init__.py Add empty-init code-smell script. (#18406) 8 years ago
test_attribute.py Use rich comparisons for Attribute and FieldAttribute 9 years ago
test_base.py add a unit test for playbook/base.py (#17688) 8 years ago
test_block.py Fix uninitialized variable in deserialize method (#18037) 8 years ago
test_play.py Switch tests from sudo to become. (#17694) 8 years ago
test_play_context.py Mcsalgado's change to use shlex.quote instead of pipes.quote (#18534) 8 years ago
test_playbook.py Added tests for `taggable` module 10 years ago
test_taggable.py Added tests for `taggable` module 10 years ago
test_task.py Making the switch to v2 10 years ago