docstr: Tests that different fields are ordered by tag number.
  
  For reference, here are the relevant tag numbers from compare_test.proto:
    optional string string_ = 1;
    optional int64 int64_ = 2;
    optional float float_ = 3;
    optional Small small = 8;
    optional Medium medium = 7;
    optional Small small = 8;
docstr_tok: ["Tests","that","different","fields","are","ordered","by","tag","number",".","For","reference",",","here","are","the","relevant","tag","numbers","from","compare_test.proto",":","optional","string","string_","=","1",";","optional","int64","int64_","=","2",";","optional","float","float_","=","3",";","optional","Small","small","=","8",";","optional","Medium","medium","=","7",";","optional","Small","small","=","8",";"]
code: def testTagOrder(self):
      """Tests that different fields are ordered by tag number.
  
      For reference, here are the relevant tag numbers from compare_test.proto:
        optional string string_ = 1;
        optional int64 int64_ = 2;
        optional float float_ = 3;
        optional Small small = 8;
        optional Medium medium = 7;
        optional Small small = 8;
      """
      self.assertNotEqual(
          'string_: "a"                      ',
          "             int64_: 1            ",
      )
      self.assertNotEqual(
          'string_: "a" int64_: 2            ',
          "             int64_: 1            ",
      )
      self.assertNotEqual(
          'string_: "b" int64_: 1            ',
          'string_: "a" int64_: 2            ',
      )
      self.assertEqual(
          'string_: "a" int64_: 1            ',
          'string_: "a" int64_: 1            ',
      )
      self.assertNotEqual(
          'string_: "a" int64_: 1 float_: 0.0',
          'string_: "a" int64_: 1            ',
      )
      self.assertEqual(
          'string_: "a" int64_: 1 float_: 0.0',
          'string_: "a" int64_: 1 float_: 0.0',
      )
      self.assertNotEqual(
          'string_: "a" int64_: 1 float_: 0.1',
          'string_: "a" int64_: 1 float_: 0.0',
      )
      self.assertNotEqual(
          'string_: "a" int64_: 2 float_: 0.0',
          'string_: "a" int64_: 1 float_: 0.1',
      )
      self.assertNotEqual(
          'string_: "a"                      ',
          "             int64_: 1 float_: 0.1",
      )
      self.assertNotEqual(
          'string_: "a"           float_: 0.0',
          "             int64_: 1            ",
      )
      self.assertNotEqual(
          'string_: "b"           float_: 0.0',
          'string_: "a" int64_: 1            ',
      )
  
      self.assertNotEqual('string_: "a"', 'small < strings: "a" >')
      self.assertNotEqual(
          'string_: "a" small < strings: "a" >',
          'small < strings: "b" >',
      )
      self.assertNotEqual(
          'string_: "a" small < strings: "b" >',
          'string_: "a" small < strings: "a" >',
      )
      self.assertEqual(
          'string_: "a" small < strings: "a" >',
          'string_: "a" small < strings: "a" >',
      )
  
      self.assertNotEqual(
          'string_: "a" medium <>',
          'string_: "a" small < strings: "a" >',
      )
      self.assertNotEqual(
          'string_: "a" medium < smalls <> >',
          'string_: "a" small < strings: "a" >',
      )
      self.assertNotEqual("medium <>", 'small < strings: "a" >')
      self.assertNotEqual(
          "medium <> small <>", 'small < strings: "a" >'
      )
      self.assertNotEqual(
          "medium < smalls <> >", 'small < strings: "a" >'
      )
      self.assertNotEqual(
          'medium < smalls < strings: "a" > >', 'small < strings: "b" >'
      )
  
imports: import copy
  import re
  import sys
  import textwrap
  from google.protobuf import text_format
  from tensorflow.python.platform import googletest
  from tensorflow.python.util.protobuf import compare
  from tensorflow.python.util.protobuf import compare_test_pb2
label_desc: Use image node_id 9 for calling the ProtoEqTest obj's underlying member method code with example usage: obj.testTagOrder() without return types