scripts/notebooks/test.py
def testNumberRepo (self, mock_stdout):
        """
        Test extract_url_repo_name find specific number of repo
        
        """
        query_github = BT_mining_script_for_testing.query_github
        limit_result_size = BT_mining_script_for_testing.limit_result_size
        extract_url_repo_name = BT_mining_script_for_testing.extract_url_repo_name
               
        desired_size = 2
        g = Github(self.data)

        expected_output = "The number of repository: 2\n"
        extract_url_repo_name(limit_result_size(query_github(g ,keywords = "py_trees_ros"),desired_size))
        self.assertEqual((re.search( "(The number of repository: 2\n)", mock_stdout.getvalue()).group(1)), expected_output, "Number of repo is not similar to study")

        Test extract_url_repo_name find specific number of repo
        
        
Test extract_url_repo_name find specific number of repo
Test extract_url_repo_name find specific number of repo
def testNumberRepo (self, mock_stdout):
        query_github = BT_mining_script_for_testing.query_github
        limit_result_size = BT_mining_script_for_testing.limit_result_size
        extract_url_repo_name = BT_mining_script_for_testing.extract_url_repo_name
        desired_size = 2
        g = Github(self.data)
        expected_output = "The number of repository: 2\n"
        extract_url_repo_name(limit_result_size(query_github(g ,keywords = "py_trees_ros"),desired_size))
        self.assertEqual((re.search( "(The number of repository: 2\n)", mock_stdout.getvalue()).group(1)), expected_output, "Number of repo is not similar to study")
def testNumberRepo ( self , mock_stdout ) : query_github = BT_mining_script_for_testing . query_github limit_result_size = BT_mining_script_for_testing . limit_result_size extract_url_repo_name = BT_mining_script_for_testing . extract_url_repo_name desired_size = 2 g = Github ( self . data ) expected_output = "The number of repository: 2\n" extract_url_repo_name ( limit_result_size ( query_github ( g , keywords = "py_trees_ros" ) , desired_size ) ) self . assertEqual ( ( re . search ( "(The number of repository: 2\n)" , mock_stdout . getvalue ( ) ) . group ( 1 ) ) , expected_output , "Number of repo is not similar to study" )
Test extract_url_repo_name find specific number of repo
Test extract_url_repo_name find specific number of repo
"""
        Test extract_url_repo_name find specific number of repo
        
        """
self
mock_stdout