# Path: pysc2/lib/image_differencer.py
# def image_differencer(path, proto_a, proto_b):
#   """proto_diff differencer for PySC2 image data."""
#   if path[-1] == "data" and len(path) >= 2:
#     image_data_path = proto_diff.ProtoPath(path[:-1])
#     image_data_a = image_data_path.get_field(proto_a)
#     if isinstance(image_data_a, common_pb2.ImageData):
#       image_data_b = image_data_path.get_field(proto_b)
#       image_a = features.Feature.unpack_layer(image_data_a)
#       image_b = features.Feature.unpack_layer(image_data_b)
#       return np_util.summarize_array_diffs(image_a, image_b)
# 
#   return None
# 
# Path: pysc2/lib/proto_diff.py
# _ARRAY_PLACEHOLDER = "*"
# class ProtoPath(object):
# class ProtoDiffs(object):
#   def __init__(self, path):
#   def get_field(self, proto):
#   def with_anonymous_array_indices(self):
#   def path(self):
#   def __lt__(self, other):
#   def __getitem__(self, item):
#   def __len__(self):
#   def __eq__(self, o):
#   def __hash__(self):
#   def __repr__(self):
#   def __init__(self, proto_a, proto_b, changed, added, removed):
#   def proto_a(self):
#   def proto_b(self):
#   def changed(self):
#   def added(self):
#   def removed(self):
#   def all_diffs(self):
#   def report(self, differencers=None, truncate_to=0):
#   def __repr__(self):
# def _truncate(val, truncate_to):
# def _dict_path_to_proto_path(dict_path):
# def compute_diff(proto_a, proto_b):


from absl.testing import absltest
from pysc2.lib import image_differencer
from pysc2.lib import proto_diff
from s2clientprotocol import common_pb2
from s2clientprotocol import sc2api_pb2 as sc_pb
from s2clientprotocol import spatial_pb2
import numpy as np
#!/usr/bin/python
# Copyright 2019 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for image_differencer.py."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function




class ImageDifferencerTest(absltest.TestCase):

  def testFilteredOut(self):

# Path: pysc2/lib/image_differencer.py
# def image_differencer(path, proto_a, proto_b):
#   """proto_diff differencer for PySC2 image data."""
#   if path[-1] == "data" and len(path) >= 2:
#     image_data_path = proto_diff.ProtoPath(path[:-1])
#     image_data_a = image_data_path.get_field(proto_a)
#     if isinstance(image_data_a, common_pb2.ImageData):
#       image_data_b = image_data_path.get_field(proto_b)
#       image_a = features.Feature.unpack_layer(image_data_a)
#       image_b = features.Feature.unpack_layer(image_data_b)
#       return np_util.summarize_array_diffs(image_a, image_b)
# 
#   return None
# 
# Path: pysc2/lib/proto_diff.py
# _ARRAY_PLACEHOLDER = "*"
# class ProtoPath(object):
# class ProtoDiffs(object):
#   def __init__(self, path):
#   def get_field(self, proto):
#   def with_anonymous_array_indices(self):
#   def path(self):
#   def __lt__(self, other):
#   def __getitem__(self, item):
#   def __len__(self):
#   def __eq__(self, o):
#   def __hash__(self):
#   def __repr__(self):
#   def __init__(self, proto_a, proto_b, changed, added, removed):
#   def proto_a(self):
#   def proto_b(self):
#   def changed(self):
#   def added(self):
#   def removed(self):
#   def all_diffs(self):
#   def report(self, differencers=None, truncate_to=0):
#   def __repr__(self):
# def _truncate(val, truncate_to):
# def _dict_path_to_proto_path(dict_path):
# def compute_diff(proto_a, proto_b):


# Path: pysc2/lib/image_differencer_test.py
from absl.testing import absltest
from pysc2.lib import image_differencer
from pysc2.lib import proto_diff
from s2clientprotocol import common_pb2
from s2clientprotocol import sc2api_pb2 as sc_pb
from s2clientprotocol import spatial_pb2
import numpy as np

#!/usr/bin/python
# Copyright 2019 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for image_differencer.py."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function




class ImageDifferencerTest(absltest.TestCase):

  def testFilteredOut(self):

    result = image_differencer.image_differencer(