From 764f9150137a542163a77d834fe385dac3f578c7 Mon Sep 17 00:00:00 2001 From: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com> Date: Tue, 12 Feb 2019 14:14:35 -0800 Subject: [PATCH 1/2] fix expected pytest output for pytest integration after pinning to 3.0.7 --- .../python/pants_test/rules/test_test_integration.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/python/pants_test/rules/test_test_integration.py b/tests/python/pants_test/rules/test_test_integration.py index 913752de8dc..60127dadf22 100644 --- a/tests/python/pants_test/rules/test_test_integration.py +++ b/tests/python/pants_test/rules/test_test_integration.py @@ -74,7 +74,7 @@ def test_passing_python_test(self): plugins: SOME_TEXT collected 1 items -testprojects/tests/python/pants/dummies/test_pass.py . [100%] +testprojects/tests/python/pants/dummies/test_pass.py . =========================== 1 passed in SOME_TEXT =========================== @@ -94,7 +94,7 @@ def test_failing_python_test(self): plugins: SOME_TEXT collected 1 items -testprojects/tests/python/pants/dummies/test_fail.py F [100%] +testprojects/tests/python/pants/dummies/test_fail.py F =================================== FAILURES =================================== __________________________________ test_fail ___________________________________ @@ -122,7 +122,7 @@ def test_source_dep(self): plugins: SOME_TEXT collected 1 items -testprojects/tests/python/pants/dummies/test_with_source_dep.py . [100%] +testprojects/tests/python/pants/dummies/test_with_source_dep.py . =========================== 1 passed in SOME_TEXT =========================== @@ -141,7 +141,7 @@ def test_thirdparty_dep(self): plugins: SOME_TEXT collected 1 items -testprojects/tests/python/pants/dummies/test_with_thirdparty_dep.py . [100%] +testprojects/tests/python/pants/dummies/test_with_thirdparty_dep.py . =========================== 1 passed in SOME_TEXT =========================== @@ -162,7 +162,7 @@ def test_mixed_python_tests(self): plugins: SOME_TEXT collected 1 items -testprojects/tests/python/pants/dummies/test_fail.py F [100%] +testprojects/tests/python/pants/dummies/test_fail.py F =================================== FAILURES =================================== __________________________________ test_fail ___________________________________ @@ -179,7 +179,7 @@ def test_fail(): plugins: SOME_TEXT collected 1 items -testprojects/tests/python/pants/dummies/test_pass.py . [100%] +testprojects/tests/python/pants/dummies/test_pass.py . =========================== 1 passed in SOME_TEXT =========================== From 6095d0ae02356e8f746c8546598220a1d1c83d14 Mon Sep 17 00:00:00 2001 From: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com> Date: Tue, 12 Feb 2019 16:03:23 -0800 Subject: [PATCH 2/2] fix hastily added test for py3 support --- tests/python/pants_test/util/test_objects.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/python/pants_test/util/test_objects.py b/tests/python/pants_test/util/test_objects.py index 6fff0e54aa7..4813e0cd5cf 100644 --- a/tests/python/pants_test/util/test_objects.py +++ b/tests/python/pants_test/util/test_objects.py @@ -13,10 +13,9 @@ from future.utils import PY2, PY3, text_type from pants.util.collections_abc_backport import OrderedDict -from pants.util.objects import (EnumVariantSelectionError, Exactly, SubclassesOf, - SuperclassesOf, TypeCheckError, TypeConstraintError, - TypedCollection, TypedDatatypeInstanceConstructionError, datatype, - enum) +from pants.util.objects import (EnumVariantSelectionError, Exactly, SubclassesOf, SuperclassesOf, + TypeCheckError, TypeConstraintError, TypedCollection, + TypedDatatypeInstanceConstructionError, datatype, enum) from pants_test.test_base import TestBase @@ -678,7 +677,7 @@ def compare_str(unicode_type_name, include_unicode=False): WithCollectionTypeConstraint([3, "asdf"]) expected_msg = """\ type check error in class WithCollectionTypeConstraint: errors type checking constructor arguments: -field 'dependencies' was invalid: in wrapped constraint TypedCollection(Exactly(int)) matching iterable object [3, u'asdf']: value u'asdf' (with type 'unicode') must satisfy this type constraint: Exactly(int).""".format(u='u' if PY2 else '', string_type='unicode' if PY2 else 'str') +field 'dependencies' was invalid: in wrapped constraint TypedCollection(Exactly(int)) matching iterable object [3, {u}'asdf']: value {u}'asdf' (with type '{string_type}') must satisfy this type constraint: Exactly(int).""".format(u='u' if PY2 else '', string_type='unicode' if PY2 else 'str') self.assertEqual(str(cm.exception), expected_msg) def test_copy(self):