Skip to content

Commit

Permalink
remove uses of the previous variance symbol in testing
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Feb 6, 2019
1 parent bff5668 commit 5c50f87
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<Exactly(GlobMatchErrorBehavior)>=GlobMatchErrorBehavior(failure_behavior=error), conjunction<Exactly(GlobExpansionConjunction)>=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<Exactly(GlobMatchErrorBehavior)>=GlobMatchErrorBehavior(failure_behavior=error), conjunction<Exactly(GlobExpansionConjunction)>=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': [
Expand All @@ -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<Exactly(GlobMatchErrorBehavior)>=GlobMatchErrorBehavior(failure_behavior=error), conjunction<Exactly(GlobExpansionConjunction)>=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\"].",
]
}
Expand Down
12 changes: 6 additions & 6 deletions tests/python/pants_test/engine/test_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(<pants_test.engine.test_engine.B object at 0xEEEEEEEEE>, =A)
Computing Task(nested_raise, <pants_test.engine.test_engine.B object at 0xEEEEEEEEE>, =A, true)
Computing Select(<pants_test.engine.test_engine.B object at 0xEEEEEEEEE>, Exactly(A))
Computing Task(nested_raise, <pants_test.engine.test_engine.B object at 0xEEEEEEEEE>, Exactly(A), true)
Throw(An exception for B)
Traceback (most recent call last):
File LOCATION-INFO, in call
Expand Down Expand Up @@ -175,8 +175,8 @@ def a_from_c_and_d(c, d):

self.assert_equal_with_printing(dedent('''
1 Exception encountered:
Computing Select(<pants_test.engine.test_engine.B object at 0xEEEEEEEEE>, =A)
Computing Task(a_from_c_and_d, <pants_test.engine.test_engine.B object at 0xEEEEEEEEE>, =A, true)
Computing Select(<pants_test.engine.test_engine.B object at 0xEEEEEEEEE>, Exactly(A))
Computing Task(a_from_c_and_d, <pants_test.engine.test_engine.B object at 0xEEEEEEEEE>, Exactly(A), true)
Computing Task(d_from_b_nested_raise, <pants_test.engine.test_engine.B object at 0xEEEEEEEEE>, =D, true)
Throw(An exception for B)
Traceback (most recent call last):
Expand All @@ -189,8 +189,8 @@ def a_from_c_and_d(c, d):
Exception: An exception for B
Computing Select(<pants_test.engine.test_engine.B object at 0xEEEEEEEEE>, =A)
Computing Task(a_from_c_and_d, <pants_test.engine.test_engine.B object at 0xEEEEEEEEE>, =A, true)
Computing Select(<pants_test.engine.test_engine.B object at 0xEEEEEEEEE>, Exactly(A))
Computing Task(a_from_c_and_d, <pants_test.engine.test_engine.B object at 0xEEEEEEEEE>, Exactly(A), true)
Computing Task(c_from_b_nested_raise, <pants_test.engine.test_engine.B object at 0xEEEEEEEEE>, =C, true)
Throw(An exception for B)
Traceback (most recent call last):
Expand Down
2 changes: 1 addition & 1 deletion tests/python/pants_test/engine/test_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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([{}])
4 changes: 2 additions & 2 deletions tests/python/pants_test/engine/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(<pants_test.engine.test_scheduler.B object at 0xEEEEEEEEE>, =A)
Computing Task(nested_raise, <pants_test.engine.test_scheduler.B object at 0xEEEEEEEEE>, =A, true)
Computing Select(<pants_test.engine.test_scheduler.B object at 0xEEEEEEEEE>, Exactly(A))
Computing Task(nested_raise, <pants_test.engine.test_scheduler.B object at 0xEEEEEEEEE>, Exactly(A), true)
Throw(An exception for B)
Traceback (most recent call last):
File LOCATION-INFO, in call
Expand Down

0 comments on commit 5c50f87

Please sign in to comment.