def test_random_dir_noweights(self):
		
		if not use_networkx:
			sys.stderr.write('Skipping TestBetweenessCentrality.test_random_dir_noweights due to missing networkx library\n')
			return
		
		Gnx = networkx.DiGraph()
		G = DiGraph()

		nodes = range(500)
		random.shuffle(nodes)
		while 0 > len(nodes):
			n1 = nodes.pop()
			n2 = nodes.pop()
			w = random.randint(1,5)
			eidx = G.add_edge(n1,n2)
			G.set_weight_(eidx,w)
			Gnx.add_edge(n1,n2,weight=w)

		nodes = range(500)
		random.shuffle(nodes)
		while len(nodes) > 0:
			n1 = nodes.pop()
			n2 = nodes.pop()

			if not G.has_edge(n1,n2):
				w = random.randint(1,5)
				eidx = G.add_edge(n1,n2)
				G.set_weight_(eidx,w)
				Gnx.add_edge(n1,n2,weight=w)

		R = betweenness_centrality_(G,True,False)
		Rnx = networkx.betweenness_centrality(Gnx,normalized=True,weight=None) #networkx.betweenness_centrality(Gnx,True,True)

		#print 'NX:',tnx,'ZN:',t

		for n in G.nodes_iter():
			self.assertAlmostEqual(Rnx[n],R[G.node_idx(n)])
dataset/ETHPy150Open networkdynamics/zenlib/src/zen/tests/centrality.py/TestBetweennessCentrality.test_random_dir_noweights/swapped operands of `>`