File tree Expand file tree Collapse file tree
examples/shopping_ads/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import unittest
2+ from examples .shopping_ads import add_listing_scope
3+
4+ class TestAddListingScope (unittest .TestCase ):
5+ def test_script_runs (self ):
6+ # Basic test to ensure the main function can be imported and called.
7+ try :
8+ # Attempt to import and call the main function if it exists
9+ # This is a placeholder and might need adjustment based on the
10+ # actual structure of add_listing_scope.py
11+ add_listing_scope .main
12+ self .assertTrue (True )
13+ except AttributeError :
14+ self .fail ("add_listing_scope.py does not have a main function or it's not importable." )
15+ except Exception as e :
16+ self .fail (f"Running add_listing_scope.py main function failed with { e } " )
17+
18+ if __name__ == "__main__" :
19+ unittest .main ()
Original file line number Diff line number Diff line change 1+ import unittest
2+ from examples .shopping_ads import add_performance_max_product_listing_group_tree
3+
4+ class TestAddPerformanceMaxProductListingGroupTree (unittest .TestCase ):
5+ def test_script_runs (self ):
6+ # Basic test to ensure the main function can be imported and called.
7+ try :
8+ add_performance_max_product_listing_group_tree .main
9+ self .assertTrue (True )
10+ except AttributeError :
11+ self .fail ("add_performance_max_product_listing_group_tree.py does not have a main function or it's not importable." )
12+ except Exception as e :
13+ self .fail (f"Running add_performance_max_product_listing_group_tree.py main function failed with { e } " )
14+
15+ if __name__ == "__main__" :
16+ unittest .main ()
Original file line number Diff line number Diff line change 1+ import unittest
2+ from examples .shopping_ads import add_performance_max_retail_campaign
3+
4+ class TestAddPerformanceMaxRetailCampaign (unittest .TestCase ):
5+ def test_script_runs (self ):
6+ # Basic test to ensure the main function can be imported and called.
7+ try :
8+ add_performance_max_retail_campaign .main
9+ self .assertTrue (True )
10+ except AttributeError :
11+ self .fail ("add_performance_max_retail_campaign.py does not have a main function or it's not importable." )
12+ except Exception as e :
13+ self .fail (f"Running add_performance_max_retail_campaign.py main function failed with { e } " )
14+
15+ if __name__ == "__main__" :
16+ unittest .main ()
Original file line number Diff line number Diff line change 1+ import unittest
2+ from examples .shopping_ads import add_shopping_product_ad
3+
4+ class TestAddShoppingProductAd (unittest .TestCase ):
5+ def test_script_runs (self ):
6+ # Basic test to ensure the main function can be imported and called.
7+ try :
8+ add_shopping_product_ad .main
9+ self .assertTrue (True )
10+ except AttributeError :
11+ self .fail ("add_shopping_product_ad.py does not have a main function or it's not importable." )
12+ except Exception as e :
13+ self .fail (f"Running add_shopping_product_ad.py main function failed with { e } " )
14+
15+ if __name__ == "__main__" :
16+ unittest .main ()
Original file line number Diff line number Diff line change 1+ import unittest
2+ from examples .shopping_ads import add_shopping_product_listing_group_tree
3+
4+ class TestAddShoppingProductListingGroupTree (unittest .TestCase ):
5+ def test_script_runs (self ):
6+ # Basic test to ensure the main function can be imported and called.
7+ try :
8+ add_shopping_product_listing_group_tree .main
9+ self .assertTrue (True )
10+ except AttributeError :
11+ self .fail ("add_shopping_product_listing_group_tree.py does not have a main function or it's not importable." )
12+ except Exception as e :
13+ self .fail (f"Running add_shopping_product_listing_group_tree.py main function failed with { e } " )
14+
15+ if __name__ == "__main__" :
16+ unittest .main ()
Original file line number Diff line number Diff line change 1+ import unittest
2+ from examples .shopping_ads import get_product_category_constants
3+
4+ class TestGetProductCategoryConstants (unittest .TestCase ):
5+ def test_script_runs (self ):
6+ # Basic test to ensure the main function can be imported and called.
7+ try :
8+ get_product_category_constants .main
9+ self .assertTrue (True )
10+ except AttributeError :
11+ self .fail ("get_product_category_constants.py does not have a main function or it's not importable." )
12+ except Exception as e :
13+ self .fail (f"Running get_product_category_constants.py main function failed with { e } " )
14+
15+ if __name__ == "__main__" :
16+ unittest .main ()
Original file line number Diff line number Diff line change 2828 "unittest" ,
2929 "discover" ,
3030 "--buffer" ,
31- "-s=tests " ,
31+ "-s=. " ,
3232 "-p" ,
3333 "*_test.py" ,
3434]
You can’t perform that action at this time.
0 commit comments