From 5c50f875efa7b794b0ff7448220e25c962265673 Mon Sep 17 00:00:00 2001 From: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com> Date: Wed, 6 Feb 2019 12:28:46 -0800 Subject: [PATCH] remove uses of the previous variance symbol in testing --- .../engine/legacy/test_graph_integration.py | 6 +++--- tests/python/pants_test/engine/test_engine.py | 12 ++++++------ tests/python/pants_test/engine/test_objects.py | 2 +- tests/python/pants_test/engine/test_scheduler.py | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/python/pants_test/engine/legacy/test_graph_integration.py b/tests/python/pants_test/engine/legacy/test_graph_integration.py index dc8751c068e..2f9b9b167d3 100644 --- a/tests/python/pants_test/engine/legacy/test_graph_integration.py +++ b/tests/python/pants_test/engine/legacy/test_graph_integration.py @@ -61,12 +61,12 @@ def _list_target_check_warnings_sources(self, target_name): _ERR_TARGETS = { 'testprojects/src/python/sources:some-missing-some-not': [ "globs('*.txt', '*.rs')", - "Snapshot(PathGlobs(include=({unicode_literal}\'testprojects/src/python/sources/*.txt\', {unicode_literal}\'testprojects/src/python/sources/*.rs\'), exclude=(), glob_match_error_behavior<=GlobMatchErrorBehavior>=GlobMatchErrorBehavior(failure_behavior=error), conjunction<=GlobExpansionConjunction>=GlobExpansionConjunction(conjunction=all_match)))".format(unicode_literal='u' if PY2 else ''), + "Snapshot(PathGlobs(include=({unicode_literal}\'testprojects/src/python/sources/*.txt\', {unicode_literal}\'testprojects/src/python/sources/*.rs\'), exclude=(), glob_match_error_behavior=GlobMatchErrorBehavior(failure_behavior=error), conjunction=GlobExpansionConjunction(conjunction=all_match)))".format(unicode_literal='u' if PY2 else ''), "Globs did not match. Excludes were: []. Unmatched globs were: [\"testprojects/src/python/sources/*.rs\"].", ], 'testprojects/src/python/sources:missing-sources': [ "*.scala", - "Snapshot(PathGlobs(include=({unicode_literal}\'testprojects/src/python/sources/*.scala\',), exclude=({unicode_literal}\'testprojects/src/python/sources/*Test.scala\', {unicode_literal}\'testprojects/src/python/sources/*Spec.scala\'), glob_match_error_behavior<=GlobMatchErrorBehavior>=GlobMatchErrorBehavior(failure_behavior=error), conjunction<=GlobExpansionConjunction>=GlobExpansionConjunction(conjunction=any_match)))".format(unicode_literal='u' if PY2 else ''), + "Snapshot(PathGlobs(include=({unicode_literal}\'testprojects/src/python/sources/*.scala\',), exclude=({unicode_literal}\'testprojects/src/python/sources/*Test.scala\', {unicode_literal}\'testprojects/src/python/sources/*Spec.scala\'), glob_match_error_behavior=GlobMatchErrorBehavior(failure_behavior=error), conjunction=GlobExpansionConjunction(conjunction=any_match)))".format(unicode_literal='u' if PY2 else ''), "Globs did not match. Excludes were: [\"testprojects/src/python/sources/*Test.scala\", \"testprojects/src/python/sources/*Spec.scala\"]. Unmatched globs were: [\"testprojects/src/python/sources/*.scala\"].", ], 'testprojects/src/java/org/pantsbuild/testproject/bundle:missing-bundle-fileset': [ @@ -75,7 +75,7 @@ def _list_target_check_warnings_sources(self, target_name): "Globs('*.aaaa')", "ZGlobs('**/*.abab')", "['file1.aaaa', 'file2.aaaa']", - "Snapshot(PathGlobs(include=({unicode_literal}\'testprojects/src/java/org/pantsbuild/testproject/bundle/*.aaaa\',), exclude=(), glob_match_error_behavior<=GlobMatchErrorBehavior>=GlobMatchErrorBehavior(failure_behavior=error), conjunction<=GlobExpansionConjunction>=GlobExpansionConjunction(conjunction=all_match)))".format(unicode_literal='u' if PY2 else ''), + "Snapshot(PathGlobs(include=({unicode_literal}\'testprojects/src/java/org/pantsbuild/testproject/bundle/*.aaaa\',), exclude=(), glob_match_error_behavior=GlobMatchErrorBehavior(failure_behavior=error), conjunction=GlobExpansionConjunction(conjunction=all_match)))".format(unicode_literal='u' if PY2 else ''), "Globs did not match. Excludes were: []. Unmatched globs were: [\"testprojects/src/java/org/pantsbuild/testproject/bundle/*.aaaa\"].", ] } diff --git a/tests/python/pants_test/engine/test_engine.py b/tests/python/pants_test/engine/test_engine.py index 1944c2e3260..9ad331b0aa9 100644 --- a/tests/python/pants_test/engine/test_engine.py +++ b/tests/python/pants_test/engine/test_engine.py @@ -123,8 +123,8 @@ def test_include_trace_error_raises_error_with_trace(self): self.assert_equal_with_printing(dedent(''' 1 Exception encountered: - Computing Select(, =A) - Computing Task(nested_raise, , =A, true) + Computing Select(, Exactly(A)) + Computing Task(nested_raise, , Exactly(A), true) Throw(An exception for B) Traceback (most recent call last): File LOCATION-INFO, in call @@ -175,8 +175,8 @@ def a_from_c_and_d(c, d): self.assert_equal_with_printing(dedent(''' 1 Exception encountered: - Computing Select(, =A) - Computing Task(a_from_c_and_d, , =A, true) + Computing Select(, Exactly(A)) + Computing Task(a_from_c_and_d, , Exactly(A), true) Computing Task(d_from_b_nested_raise, , =D, true) Throw(An exception for B) Traceback (most recent call last): @@ -189,8 +189,8 @@ def a_from_c_and_d(c, d): Exception: An exception for B - Computing Select(, =A) - Computing Task(a_from_c_and_d, , =A, true) + Computing Select(, Exactly(A)) + Computing Task(a_from_c_and_d, , Exactly(A), true) Computing Task(c_from_b_nested_raise, , =C, true) Throw(An exception for B) Traceback (most recent call last): diff --git a/tests/python/pants_test/engine/test_objects.py b/tests/python/pants_test/engine/test_objects.py index fcaaa867f15..2ad9f0e8268 100644 --- a/tests/python/pants_test/engine/test_objects.py +++ b/tests/python/pants_test/engine/test_objects.py @@ -27,5 +27,5 @@ def test_element_typechecking(self): IntOrStringColl = Collection.of(int, text_type) self.assertEqual([3, "hello"], [x for x in IntOrStringColl([3, "hello"])]) with self.assertRaisesRegexp(TypeCheckError, re.escape("""\ -field 'dependencies' was invalid: in wrapped constraint TypedCollection(Exactly(int, unicode)) matching iterable object [{}]: value {} (with type 'dict') must satisfy this type constraint: Exactly(int, unicode).""")): +field 'dependencies' was invalid: in wrapped constraint TypedCollection(Exactly(int, unicode)) matching iterable object [{}]: value {} (with type 'dict') must satisfy this type constraint: Exactly(int or unicode).""")): IntOrStringColl([{}]) diff --git a/tests/python/pants_test/engine/test_scheduler.py b/tests/python/pants_test/engine/test_scheduler.py index 108d2bda5cc..586fbfb6e00 100644 --- a/tests/python/pants_test/engine/test_scheduler.py +++ b/tests/python/pants_test/engine/test_scheduler.py @@ -122,8 +122,8 @@ def test_trace_includes_rule_exception_traceback(self): trace = remove_locations_from_traceback(trace) assert_equal_with_printing(self, dedent(''' - Computing Select(, =A) - Computing Task(nested_raise, , =A, true) + Computing Select(, Exactly(A)) + Computing Task(nested_raise, , Exactly(A), true) Throw(An exception for B) Traceback (most recent call last): File LOCATION-INFO, in call