示例#1
0
    def test_if_pagerank_file_contains_results(self):
        tests.valid_json_file(u'pagerank')
        with open(tests.get_submission_location(u'pagerank'), 'r') as fh:
            l = json.load(fh)

        self.assertTrue(len(l) == 20)
        self.assertGreater(len(l[0]), 0)
示例#2
0
    def test_if_hits_file_contains_results_tuple(self):
        tests.valid_json_file(u'hits')
        with open(tests.get_submission_location(u'hits'), 'r') as fh:
            hubs, authorities = json.load(fh)

        self.assertTrue(type(hubs) == dict)
        self.assertTrue(type(authorities) == dict)
    def test_if_communities_file_contains_results_tuple(self):
        self.assertTrue(tests.valid_json_file(u'communities'))
        with open(tests.get_submission_location(u'communities'), 'r') as fh:
            iterations, components = json.load(fh)

        self.assertTrue(type(iterations) == int)
        self.assertTrue(type(components) == list)
 def test_if_clustering_file_exists(self):
   self.assertTrue(os.path.exists(tests.get_submission_location(u'clustering')))
 def test_if_clustering_file_contains_results_tuple(self):
   self.assertTrue(tests.valid_json_file(u'clustering'))
   with open(tests.get_submission_location(u'clustering'), 'r') as fh:
     _, _ = json.load(fh)
示例#6
0
 def test_if_pagerank_file_exists(self):
     self.assertTrue(
         os.path.exists(tests.get_submission_location(u'pagerank')))
示例#7
0
 def test_if_distance_file_exists(self):
     self.assertTrue(
         os.path.exists(tests.get_submission_location(u'distance')))
示例#8
0
 def test_if_hits_file_exists(self):
     self.assertTrue(os.path.exists(tests.get_submission_location(u'hits')))
 def test_if_communities_file_exists(self):
     self.assertTrue(
         os.path.exists(tests.get_submission_location(u'communities')))
 def test_if_degree_file_contains_results_tuple(self):
     tests.valid_json_file(u'degree')
     with open(tests.get_submission_location(u'degree'), 'r') as fh:
         _, _, _ = json.load(fh)
 def test_if_scatter_file_exists(self):
   self.assertTrue(os.path.exists(tests.get_submission_location(u'scatter')))