コード例 #1
0
    def test_one_tweet(self):
        graph = tweet_graph()

        # Insert the 1st tweet to the graph
        graph = self.update_graph_with_tweet(graph, 0)

        self.check_one_tweet_graph(graph)
コード例 #2
0
    def test_one_tweet(self):
        graph = tweet_graph()

        # Insert the 1st tweet to the graph
        graph = self.update_graph_with_tweet(graph, 0)

        self.check_one_tweet_graph(graph)
コード例 #3
0
    def test_five_tweet(self):
        graph = tweet_graph()
        num_tweets = 5;

        # Insert the two tweets to the graph
        for i in range(num_tweets):
            graph = self.update_graph_with_tweet(graph, i)

        self.check_five_tweets_graph(graph)
コード例 #4
0
    def test_five_tweet(self):
        graph = tweet_graph()
        num_tweets = 5

        # Insert the two tweets to the graph
        for i in range(num_tweets):
            graph = self.update_graph_with_tweet(graph, i)

        self.check_five_tweets_graph(graph)
コード例 #5
0
    def test_ten_tweet(self):
        graph = tweet_graph()
        num_tweets = 10;

        # Insert the seven tweets to the graph
        # "storm" node is retired
        for i in range(num_tweets):
            graph = self.update_graph_with_tweet(graph, i)

        self.check_ten_tweets_graph(graph)
コード例 #6
0
    def test_six_tweet(self):
        graph = tweet_graph()
        num_tweets = 6;

        # Insert the two tweets to the graph
        for i in range(num_tweets):
            graph = self.update_graph_with_tweet(graph, i)

        # Graph is disconnected into two parts
        self.check_six_tweets_graph(graph)
コード例 #7
0
    def test_three_tweet(self):
        graph = tweet_graph()

        # Insert the three tweets to the graph
        num_tweets = 3;

        for i in range(num_tweets):
            graph = self.update_graph_with_tweet(graph, i)

        self.check_two_tweets_graph(graph)
コード例 #8
0
    def test_ten_tweet(self):
        graph = tweet_graph()
        num_tweets = 10

        # Insert the seven tweets to the graph
        # "storm" node is retired
        for i in range(num_tweets):
            graph = self.update_graph_with_tweet(graph, i)

        self.check_ten_tweets_graph(graph)
コード例 #9
0
    def test_six_tweet(self):
        graph = tweet_graph()
        num_tweets = 6

        # Insert the two tweets to the graph
        for i in range(num_tweets):
            graph = self.update_graph_with_tweet(graph, i)

        # Graph is disconnected into two parts
        self.check_six_tweets_graph(graph)
コード例 #10
0
    def test_three_tweet(self):
        graph = tweet_graph()

        # Insert the three tweets to the graph
        num_tweets = 3

        for i in range(num_tweets):
            graph = self.update_graph_with_tweet(graph, i)

        self.check_two_tweets_graph(graph)