TST: added tests for newman_parition  function, added ValueError if graph passed has weighted matrix