init_facets: Add documentation
init_facets is not included in the default sphinx documentation but this
docstring should help people digging into cubicweb core. This could go in an
Advanced developer section of the book.
functiondatetuple(d){return[d.getFullYear(),d.getMonth()+1,d.getDate(),d.getHours(),d.getMinutes()];}functionpprint(obj){print('{');for(kinobj){print(' '+k+' = '+obj[k]);}print('}');}functionarrayrepr(array){return'['+array.join(', ')+']';}functionassertArrayEquals(array1,array2){if(array1.length!=array2.length){thrownewcrosscheck.AssertionFailure(array1.join(', ')+' != '+array2.join(', '));}for(vari=0;i<array1.length;i++){if(array1[i]!=array2[i]){thrownewcrosscheck.AssertionFailure(arrayrepr(array1)+' and '+arrayrepr(array2)+' differs at index '+i);}}}