- 16 3月, 2018 1 次提交
-
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
- 15 3月, 2018 4 次提交
-
-
由 Cleber Rosa 提交于
Under Python 3.4, which runs on our CI and is our lowest supported version, json.loads() requires a string, while newer versions also allows bytes. >>> json.loads(b'{}') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/cleber/.local/lib/python3.4/json/__init__.py", line 312, in loads s.__class__.__name__)) TypeError: the JSON object must be str, not 'bytes' Let's make that code compatible with Python 3.4. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com> * https://github.com/avocado-framework/avocado: Test: deprecate srcdir
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The FDDrainer can fail to flush due to some other conditions, including when the stream handler is a plain StreamHandler, and not a FileHandler. Let's add tests that cover this situation, and another one that's already fixed that deals with closed streams. Reference: https://github.com/avocado-framework/avocado/pull/2512Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 14 3月, 2018 6 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Cleber Rosa 提交于
After much discussion, it was decided that `srcdir` must go, and `workdir` should be used instead. At this time, let's deprecate it, and in the near future, remove it. The deprecation approach chosen is to flag tests that use `srcdir` with warning, so users will hopefully take notice. Reference: https://github.com/avocado-framework/avocado/issues/1924 Reference: https://trello.com/c/U1aaJjPJ/1158-deprecate-testsrcdir Reference: https://trello.com/c/dCcxhJc2/1267-remove-testsrcdirSigned-off-by: NCleber Rosa <crosa@redhat.com>
-
The method flush() in FDDrainer does not check the stream is open before get its file descriptor, resulting in "ValueError: I/O operation on closed file". Changed flush() to check the stream is open, otherwise do not try to flush. Signed-off-by: NWainer dos Santos Moschetta <wainersm@redhat.com>
-
- 13 3月, 2018 3 次提交
-
-
由 Cleber Rosa 提交于
Under Python 3, as in Python 2, most objects are automatically hashable. Example: >>> class Foo(object): >>> pass >>> hash(Foo()) >>> 8760583602380 But if an object that implements __eq__ also has to implement __hash__. Under Python 3: >>> class Foo(object): >>> def __eq__(self, other): >>> return False Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unhashable type: 'Foo' Since TreeNode implements __eq__, under Python 3, it *must* implement __hash__. There are a few tricky points, though. One of them is that "The only required property is that objects which compare equal have the same hash value". TreeNodes have a very flexible equality comparison, which cannot be taken into account in a hash implementation which doesn't have access to the "other" object. To the best of my knowledge, the way to go with the TreeNode __hash__ implementation is to take into account the comparison of all attributes that are used on __eq__ (name, values, children) and use those as the composition for __hash__, as suggested by the Python docs. Unfortunately, some of the content of "values" and "children" may themselves be unshashable values (such as dicts coming from YAML test suite loader). My coward's way out here was to use a string representation of such unhashable types to compose the TreeNode hash. This fixes 5 unittests of the varianter_yaml_to_mux plugin when run under Python 3, such as: ====================================================================== ERROR: test_get_rel_path (tests.test_mux.TestAvocadoParams) ---------------------------------------------------------------------- .... if len(set([_[1] for _ in ret])) == 1: # single source of results TypeError: unhashable type: 'MuxTreeNode' Reference: https://docs.python.org/3/reference/datamodel.html#object.__hash__Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
In Python 3, the order of a dictionary items will be different than under Python 2. To not have to change the supporting code to return OrderedDicts, let's just simplify the comparison, breaking them down into each dictionary item. This fixes the varianter_yaml_to_mux plugin unittest failure under Python 3: ====================================================================== FAIL: test_fingerprint_order (tests.test_mux.TestMuxTree) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cleber/src/avocado/avocado/optional_plugins/varianter_yaml_to_mux/tests/test_mux.py", line 231, in test_fingerprint_order self.assertEqual(str(variant1), "{'paths': '', 'variant': " AssertionError: "{'variant_id': 'child1-child2-9154', 'varia[65 chars] ''}" != "{'paths': '', 'variant': [TreeNode(name='ch[65 chars]54'}" - {'variant_id': 'child1-child2-9154', 'variant': [TreeNode(name='child1'), TreeNode(name='child2')], 'paths': ''} + {'paths': '', 'variant': [TreeNode(name='child1'), TreeNode(name='child2')], 'variant_id': 'child1-child2-9154'} Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The items of a dictionary are not ordered by default, and between Python 2 and 3 they always come out different in my experience. Since this test is trying out the representation of a JSON built from dicts, the same applies. Let's make the checks a bit more flexible (and a bit less accurate to be honest) and check for the pieces of info inside the JSON file content. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 12 3月, 2018 2 次提交
-
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
- 09 3月, 2018 8 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Both branches of the conditional includes distros we build packages for. So, it's safe to use that "naked" build requirement. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
We currently build on EL7, Fedora 26 and Fedora 27. On EL7, some of the Python packages are prefixed with "python2", and some others are not. We have been previously using the name of "Provides" instead of the real package names. Now, Python package names on Fedora 26 and Fedora 27 are the same for those we depend on. This adds a conditional block for EL7, and another one for Fedora 26 and 27. Some Python packages have been kept on both blocks, in preparation for the Python 3 packaging that will happen only for the Fedora packages. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The package is named PyYAML on EL7, so let's use the correct name, and not the name of "Provides" tag. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
We don't build on Fedora 24 anymore, so let's remove this hack. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
It's about time we stop providing support for "avocado". The other package the project ships, "avocado-plugins-vt" (also badly named) uses python-avocado as a requirement name. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com> * https://github.com/avocado-framework/avocado: Remove deprecated multiplex options
-
- 08 3月, 2018 10 次提交
-
-
由 Cleber Rosa 提交于
On Python 3, the calculation of a value for a unit will return a float. Let's make things predictable accross Python 2 and 3 and force an integer instead. Reference: https://github.com/avocado-framework/avocado/pull/2498Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The skip() method has been deprecated for quite some time. Let's remove it for good and have users using the decorators and cancel() instead. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The '--filter-{only,out}' and '--multiplex' options have been deprecated in favor of '--mux-filter-{only,out}' and '--mux-yaml'. Let's remove them for good. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
To avoid breakage when newer versions come out, let's pin to current GitHub API version to v3. Reference: https://developer.github.com/v3/media/#request-specific-versionSigned-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Amador Pahim 提交于
There's a new DataSize object in avocado.utils.datastructures. Let's remove the redundant code and just use the DataSize object. Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Amador Pahim 提交于
Now that we have a second use case for it, let's finally create the DataSize object. Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Lukáš Doktor 提交于
Sometimes it's useful to be able to specify multiple references and not just a single one. When list is provided with this patch per-item discovery is performed. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
Allowing name_prefix to be list allows one to specified shared parts of the name_prefix inherited from upper-node: !mux functional: !mux name_prefix: ["functional-"] rpm: name_prefix: ["rpm"] git: name_prefix: ["git"] which results in: "functional-rpm" and "functional-git". Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The `extra_params` is a mutable object and can be modified by loader. This happens eg. in external_runner loader which removes the optional key. This patch uses `copy.deepcopy` to avoid such issues. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 06 3月, 2018 1 次提交
-
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
- 01 3月, 2018 2 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 28 2月, 2018 3 次提交
-
-
由 Junxiang Li 提交于
To fix the pip 9.0.1 install python requirements with ">=2.7, >=3.4" failure, ">=2.7, >=3.4" means ">=2.7" and ">=3.4", so the result is ">=3.4" for reference: https://stackoverflow.com/questions/44660448/Signed-off-by: NJunxiang Li <junli@redhat.com>
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Amador Pahim 提交于
Signed-off-by: NAmador Pahim <apahim@redhat.com>
-