code: def test_wkb_dumps_endianness(self):
      p = Point(0.5, 2.0)
      wkb_big_endian = wkb.dumps(p, big_endian=True)
      wkb_little_endian = wkb.dumps(p, big_endian=False)
      assert wkb_big_endian != wkb_little_endian
      # According to WKB specification in section 3.3 of OpenGIS
      # Simple Features Specification for SQL, revision 1.1, the
      # first byte of a WKB representation indicates byte order.
      # Big-endian is 0, little-endian is 1.
      assert wkb_big_endian[0] == 0
      assert wkb_little_endian[0] == 1
      # Check that the doubles (0.5, 2.0) are in correct byte order
      double_size = struct.calcsize("d")
      assert wkb_big_endian[(-2 * double_size) :] == struct.pack(
          ">2d", p.x, p.y
      )
      assert wkb_little_endian[(-2 * double_size) :] == struct.pack(
          "<2d", p.x, p.y
      )
  
file_path: shapely/shapely/tests/legacy/test_persist.py
imports: import pickle
  import struct
  import unittest
  from shapely import wkb, wkt
  from shapely.geometry import Point
label_desc: Use image node_id 3 for calling the PersistTestCase obj's underlying member method code with example usage: obj.test_wkb_dumps_endianness() without return types