Best Python code snippet using molecule_python
report_before_the_report.py
Source:report_before_the_report.py
1#!/usr/bin/env python2# coding: utf-83# In[1]:4import pandas as pd5import numpy as np6import scipy.stats as stats7import matplotlib.pyplot as plt8import seaborn as sns9import warnings10warnings.filterwarnings("ignore")11from sklearn.model_selection import train_test_split12from sklearn.tree import DecisionTreeClassifier, plot_tree, export_text13from sklearn.ensemble import RandomForestClassifier14from sklearn.linear_model import LogisticRegression15from sklearn.neighbors import KNeighborsClassifier16from sklearn.linear_model import LogisticRegression17from sklearn.neighbors import KNeighborsClassifier18from sklearn.metrics import classification_report, confusion_matrix, accuracy_score19from env import host, user, password20import acquire21import prepare22import exp_mod23import report_wdate24# # inital data retrieval and analysis25# In[2]:26telco_df=acquire.get_telco_data()27# In[3]:28telco_df.info()29# In[4]:30telco_df.describe(include='object').T31# In[5]:32telco_df.churn33# In[6]:34def initial_data(data):35 telco_df=acquire.get_telco_data()36 print('this data frame has',telco_df.shape[0],'rows and', telco_df.shape[1],'columns')37 print(' ')38 print(telco_df.info())39 print(' ')40 print(telco_df.describe())41 print(' ')42 print(telco_df.describe(include='object').T)43 print(' ')44 print(telco_df.columns)45 print('ended of initial report')46 print(' ')47# In[7]:48initial_data(telco_df)49# # Prepare Data50# In[8]:51prep_telco=prepare.prep_telco(telco_df)52prep_telco53# In[9]:54prep_telco=prep_telco.drop(columns=['phone_service.1','multiple_lines.1','internet_service_type_id.1','payment_type_id.1','online_backup.1','device_protection.1','tech_support.1','streaming_tv.1','streaming_movies.1','contract_type_id.1','paperless_billing.1','total_charges.1','monthly_charges.1','total_charges.1'],inplace=True)55# In[10]:56telco_train,telco_validate,telco_test=prepare.split_telco(prep_telco)57telco_train58# In[ ]:59# # Explore Data60# In[11]:61telco_train.info()62# In[12]:63telco_train['month']=(telco_train.total_charges/telco_train.monthly_charges)64telco_validate['month']=(telco_validate.total_charges/telco_validate.monthly_charges)65telco_test['month']=(telco_test.total_charges/telco_test.monthly_charges)66# In[13]:67telco_train.month.value_counts()68# In[14]:69telco_train.month.value_counts().nunique()70# In[15]:71telco_train.columns72# In[16]:73telco_train.contract_type74# In[17]:75telco_train[telco_train.month==1].describe().T76# In[18]:77telco_train[telco_train.month>1].describe().T78# In[19]:79telco_train[telco_train.month>1].describe().T==telco_train[telco_train.month==1].describe().T80# In[20]:81telco_train[telco_train.month==1].churn_Yes.value_counts()82# In[21]:83telco_train[telco_train.churn_Yes==1].describe().T84# In[22]:85len(telco_train[telco_train.month==1])/len(telco_train[telco_train.churn_Yes==1])86# In[23]:87telco_train[telco_train.churn_Yes==0].describe().T==telco_train[telco_train.churn_Yes==1].describe().T88# In[24]:89g=sns.JointGrid(data=telco_train, x="month", y="tenure", space=0, ratio=17,hue='churn_Yes')90g.plot_joint(sns.scatterplot, size=telco_train["churn_Yes"], sizes=(50, 120),91 color="g", alpha=.6, legend=False)92g.plot_marginals(sns.rugplot, height=1, color="g", alpha=.6)93# In[25]:94g=sns.JointGrid(data=telco_train, x="month", y="partner_Yes", space=0, ratio=17,hue='churn_Yes')95g.plot_joint(sns.scatterplot, size=telco_train["churn_Yes"], sizes=(50, 120),96 color="g", alpha=.6, legend=True)97g.plot_marginals(sns.rugplot, height=1, color="g", alpha=.6)98# In[26]:99telco_train_m=telco_train[telco_train.month<=1]100telco_train_m[telco_train_m.churn_Yes==1].describe().T101# In[27]:102telco_train_m[telco_train_m.churn_Yes==1].contract_type.value_counts()103# In[28]:104222/688105# In[29]:106report_wdate.signup_date_train(telco_train)107report_wdate.signup_date_val(telco_validate)108report_wdate.signup_date_test(telco_test)109# In[30]:110report_wdate.compareid(telco_train).nunique()111# In[31]:112sns.displot(113 data=telco_train,114 x="monthly_charges", hue="churn_Yes",115 kind="kde", height=6,116 multiple="fill", clip=(0, None),117 palette="ch:rot=-.25,hue=1,light=.75",118)119# In[32]:120sns.violinplot(data=telco_train, x='online_security_Yes',y='churn_Yes',palette="light:g", inner="points", orient="h")121# In[33]:122sns.displot(123 data=telco_train,124 x="tenure", hue="churn_Yes",125 kind="kde", height=6,126 multiple="fill", clip=(0, None),127 palette="ch:rot=-.25,hue=1,light=.75",128)129# In[34]:130sns.displot(131 data=telco_train,132 x="month", hue="churn_Yes",133 kind="kde", height=6,134 multiple="fill", clip=(0, None),135 palette="ch:rot=-.25,hue=1,light=.75",136)137# In[35]:138sns.violinplot(data=telco_train, x='signup_month',y='churn_Yes',palette="light:g", inner="points", orient="h")139# In[36]:140sns.lineplot(data=telco_train, x="signup_month", y="month",hue='churn_Yes')141# In[37]:142sns.relplot(x="signup_month", y="contract_type", hue="churn_Yes",143 sizes=(40, 400), alpha=.5, palette="muted",144 height=6, data=telco_train)145# In[38]:146sns.relplot(x="month", y="contract_type", hue="churn_Yes",147 sizes=(40, 400), alpha=.5, palette="muted",148 height=6, data=telco_train)149# In[39]:150stats.mannwhitneyu(telco_train.month, telco_train.tenure)151# # Model152# In[40]:153telco_train.churn_Yes.mode()154# In[41]:155telco_x_train = telco_train.select_dtypes(exclude=['object']).drop(columns=['churn_Yes'])156telco_y_train = telco_train.select_dtypes(exclude=['object']).churn_Yes157telco_x_validate = telco_validate.select_dtypes(exclude=['object']).drop(columns=['churn_Yes'])158telco_y_validate = telco_validate.select_dtypes(exclude=['object']).churn_Yes159telco_x_test = telco_test.select_dtypes(exclude=['object']).drop(columns=['churn_Yes'])160telco_y_test = telco_test.select_dtypes(exclude=['object']).churn_Yes161# In[42]:162(telco_y_train==0).mean()163# In[43]:164clf_telco = DecisionTreeClassifier(max_depth=3, random_state=123)165clf_telco = clf_telco.fit(telco_x_train, telco_y_train)166# In[44]:167plt.figure(figsize=(13, 7))168plot_tree(clf_telco, feature_names=telco_x_train.columns, rounded=True)169# In[45]:170telco_y_pred = pd.DataFrame({'churn': telco_y_train,'baseline': 0, 'model_1':clf_telco.predict(telco_x_train)})171telco_y_pred172# In[46]:173y_pred_proba = clf_telco.predict_proba(telco_x_train)174y_pred_proba[0:5]175# In[47]:176print('Accuracy of Decision Tree classifier on training set: {:.2f}'177 .format(clf_telco.score(telco_x_train, telco_y_train)))178# In[48]:179confusion_matrix(telco_y_pred.churn, telco_y_pred.model_1)180# In[49]:181print(classification_report(telco_y_pred.churn,telco_y_pred.model_1))182# In[50]:183pd.DataFrame(confusion_matrix(telco_y_pred.churn, telco_y_pred.model_1), index=['actual_notchurn','acutal_churn'], columns=['prep_notchurn','prep_churn'])184# In[51]:185telco_TN = 2923186telco_FP = 207187telco_FN = 642188telco_TP = 453189# In[52]:190telco_all = telco_TP + telco_FP + telco_FN + telco_TN191telco_acc = (telco_TP + telco_TN) / telco_all192telco_TurePositiveRate = telco_recall = telco_TP/ (telco_TP + telco_FN)193telco_FalsePositiveRate = telco_FP / (telco_FP + telco_TN)194telco_TrueNegativeRate = telco_TN / (telco_TN + telco_FP)195telco_FalseNegativeRate = telco_FN / (telco_FN + telco_TP)196telco_precision = telco_TP / (telco_TP + telco_FP)197telco_f1_score = 2 * (telco_precision*telco_recall) / (telco_precision+telco_recall)198telco_support_pos = telco_TP + telco_FN199telco_support_neg = telco_FP + telco_TN200# In[53]:201print('accuracy is:',telco_acc,'Ture Positive Rate is:',telco_TurePositiveRate,'False Positive Rate is:',telco_FalsePositiveRate,'/n',202 'True Negative Rate is:',telco_TrueNegativeRate,'False Negative Rate is:',telco_FalseNegativeRate,'precision is:',telco_precision,'/n',203 'f1_score is:',telco_f1_score,'support_pos is:',telco_support_pos,'support_neg is:',telco_support_neg)204# In[54]:205print(classification_report(telco_y_train, telco_y_pred.model_1))206# In[55]:207# random forest208# In[56]:209from sklearn.model_selection import train_test_split210from sklearn.ensemble import RandomForestClassifier211from sklearn.metrics import classification_report212from sklearn.metrics import confusion_matrix213from sklearn.metrics import ConfusionMatrixDisplay214rf = RandomForestClassifier(bootstrap=True, 215 class_weight=None, 216 criterion='gini',217 min_samples_leaf=1,218 n_estimators=100,219 max_depth=10, 220 random_state=123)221rf.fit(telco_x_train, telco_y_train)222# In[57]:223clf_telco.score(telco_x_train,telco_y_train)224# In[58]:225telco_y_predict=rf.predict(telco_x_train)226# In[59]:227print(classification_report(telco_y_train,telco_y_predict))228# In[60]:229confusion_matrix(telco_y_train,telco_y_predict)230# In[61]:231ConfusionMatrixDisplay(confusion_matrix(telco_y_train,telco_y_predict),display_labels=rf.classes_).plot()232# In[62]:233TN = 3018234FP = 112235FN = 293236TP = 802237# In[63]:238all = TP + FP + FN + TN239acc = (TP + TN) / all240TurePositiveRate = recall = TP/ (TP + FN)241FalsePositiveRate = FP / (FP + TN)242TrueNegativeRate = TN / (TN + FP)243FalseNegativeRate = FN / (FN + TP)244precision = TP / (TP + FP)245f1_score = 2 * (precision*recall) / (precision+recall)246support_pos = TP + FN247support_neg = FP + TN248# In[64]:249print('accuracy is:',acc,'Ture Positive Rate is:',TurePositiveRate,'False Positive Rate is:',FalsePositiveRate,'/n',250 'True Negative Rate is:',TrueNegativeRate,'False Negative Rate is:',FalseNegativeRate,'precision is:',precision,'/n',251 'f1_score is:',f1_score,'support_pos is:',support_pos,'support_neg is:',support_neg)252# In[65]:253for model in range (2,11):254 rf=RandomForestClassifier(max_depth=model, random_state=123)255 rf=rf.fit(telco_x_train,telco_y_train)256 y_predict=rf.predict(telco_x_train)257 print('model depth',model)258 print(classification_report(telco_y_train, telco_y_predict))259# In[66]:260model=[]261for num in range (2,20):262 rf=RandomForestClassifier(max_depth=num,random_state=123)263 rf=rf.fit(telco_x_train,telco_y_train)264 train_accuracy=rf.score(telco_x_train,telco_y_train)265 validate_accuracy=rf.score(telco_x_validate,telco_y_validate)266 result = {267 "max_depth": num,268 "train_accuracy": train_accuracy,269 "validate_accuracy": validate_accuracy270 }271 model.append(result)272test_validate = pd.DataFrame(model)273test_validate["difference"] = test_validate.train_accuracy - test_validate.validate_accuracy274test_validate275# In[67]:276sns.relplot(x='max_depth',y='difference',data=test_validate)277# In[68]:278model=[]279max_depth=25280for num in range (2,max_depth):281 mdepth=max_depth-num282 min_leaf=num283 rf=RandomForestClassifier(max_depth=mdepth,min_samples_leaf=min_leaf,random_state=123)284 rf=rf.fit(telco_x_train,telco_y_train)285 train_accuracy=rf.score(telco_x_train,telco_y_train)286 validate_accuracy=rf.score(telco_x_validate,telco_y_validate)287 result = {288 'min_samples_leaf':min_leaf,289 'max_depth': mdepth,290 "train_accuracy": train_accuracy,291 "validate_accuracy": validate_accuracy292 }293 model.append(result)294test_validate = pd.DataFrame(model)295test_validate["difference"] = test_validate.train_accuracy - test_validate.validate_accuracy296test_validate297# In[69]:298sns.relplot(x='max_depth',y='difference',data=test_validate)299# In[70]:300knn = KNeighborsClassifier(n_neighbors=5, weights='uniform')301knn.fit(telco_x_train, telco_y_train)302# In[71]:303y_pred= knn.predict(telco_x_train)304y_valid=knn.predict(telco_x_validate)305# In[72]:306print('Accuracy of KNN classifier on training set: {:.2f}'307 .format(knn.score(telco_x_train, telco_y_train)))308# In[73]:309model=[]310for num in range (2,20):311 knn = KNeighborsClassifier(n_neighbors=num, weights='uniform')312 knn=knn.fit(telco_x_train, telco_y_train)313 train_accuracy=knn.score(telco_x_train,telco_y_train)314 validate_accuracy=knn.score(telco_x_validate,telco_y_validate)315 result = {316 "max_depth": num,317 "train_accuracy": train_accuracy,318 "validate_accuracy": validate_accuracy319 }320 model.append(result)321test_validate = pd.DataFrame(model)322test_validate["difference"] = test_validate.train_accuracy - test_validate.validate_accuracy323test_validate324# In[74]:325sns.relplot(x='max_depth',y='difference',data=test_validate)326# In[75]:...
mastermind_test.py
Source:mastermind_test.py
...18from engine import Engine19'''20Generic function for printing results21'''22def test_validate(msg, expected, result):23 print(msg + ": "),24 if result == expected:25 print("PASSED")26 else:27 print("FAILED (" + str(expected) + " vs " + str(result) + ")")28 sys.exit()29'''30Test rows input31'''32def test_valid_rows():33 e = Engine()34 test_validate("Testing validate rows with invalid char", False, e._Engine__validate_and_assign_rows("a"))35 test_validate("Testing validate rows with 0 rows", False, e._Engine__validate_and_assign_rows("0"))36 for rows in range(1, 100):37 r = str(rows)38 test_validate("Testing validate rows with number " + r, rows in e._Engine__valid_rows, e._Engine__validate_and_assign_rows(r))39'''40Test variations input41'''42def test_valid_variations():43 e = Engine()44 test_validate("Testing validate variations with invalid char", False, e._Engine__validate_and_assign_variations("a"))45 for variations in range(1, 100):46 v = str(variations)47 test_validate("Testing validate variations with number " + v, variations >= 2, e._Engine__validate_and_assign_variations(v))48'''49Test code input50'''51def test_valid_code():52 e = Engine()53 e._Engine__variations = 5054 test_validate("Testing validate code with invalid char", False, e._Engine__validate_and_assign_code("a b c"))55 arr_too_short = [x for x in range(0, e._Engine__code_len_min - 1)]56 arr_too_sort_s = " ".join([str(a) for a in arr_too_short])57 test_validate("Testing validate code with an array too short", False, e._Engine__validate_and_assign_code(arr_too_sort_s))58 arr_too_long = [x for x in range(0, e._Engine__code_len_max + 1)]59 arr_too_long_s = " ".join([str(a) for a in arr_too_long])60 test_validate("Testing validate code with an array too long", False, e._Engine__validate_and_assign_code(arr_too_long_s))61 arr = [x for x in range(0, 100)]62 for i in range(e._Engine__code_len_min, e._Engine__code_len_max + 1):63 for idx in range(0, 100, i):64 subarr = arr[idx:idx + i]65 subarr_s = " ".join([str(x) for x in subarr])66 test_validate("Testing validate code with " + subarr_s, subarr[len(subarr) - 1] <= e._Engine__variations, e._Engine__validate_and_assign_code(subarr_s))67'''68Test that the random numbers for code follow the restrictions69'''70def test_valid_random_code():71 e = Engine()72 e._Engine__variations = 5073 for i in range(0, 100):74 e._Engine__validate_and_assign_code("")75 res = True76 for c in e._Engine__code:77 if c >= e._Engine__variations:78 res = False79 if len(e._Engine__code) < e._Engine__code_len_min:80 res = False81 if len(e._Engine__code) > e._Engine__code_len_max:82 res = False83 code_s = " ".join([str(x) for x in e._Engine__code])84 test_validate("Testing validate code with no input (" + code_s + ")", True, res)85'''86Test that the pegs input is validated properly87'''88def test_valid_pegs():89 e = Engine()90 e._Engine__variations = 5091 e._Engine__code = [0, 1, 2, 3]92 test_validate("Testing validate pegs with an array too short", True, e._Engine__validate_and_return_pegs("0 1 2") is None)93 test_validate("Testing validate pegs with an array too long", True, e._Engine__validate_and_return_pegs("0 1 2 3 4") is None)94 test_validate("Testing validate pegs with an invalid char", True, e._Engine__validate_and_return_pegs("0 1 2 a") is None)95 test_validate("Testing validate pegs with a negative number", True, e._Engine__validate_and_return_pegs("0 1 2 -1") is None)96 test_validate("Testing validate pegs with a number too large", True, e._Engine__validate_and_return_pegs("0 1 2 50") is None)97 test_validate("Testing validate pegs with a valid input", True, e._Engine__validate_and_return_pegs("0 1 2 49") is not None)98'''99Test the full matches function100'''101def test_full_matches():102 e = Engine()103 e._Engine__code = [1, 2, 3, 4]104 test_validate("Testing full matches with 1 match", 1, e._Engine__get_full_matches([1, 3, 2, 5]))105 test_validate("Testing full matches with 2 matches", 2, e._Engine__get_full_matches([1, 3, 3, 5]))106 test_validate("Testing full matches with 3 matches", 3, e._Engine__get_full_matches([1, 3, 3, 4]))107 test_validate("Testing full matches with 4 matches", 4, e._Engine__get_full_matches([1, 2, 3, 4]))108'''109Test the partial matches function110'''111def test_partial_matches():112 e = Engine()113 e._Engine__code = [1, 2, 3, 4]114 test_validate("Testing partial matches with 1 match", 1, e._Engine__get_partial_matches([1, 4, 3, 3]))115 test_validate("Testing partial matches with 2 matches", 2, e._Engine__get_partial_matches([1, 4, 3, 2]))116 test_validate("Testing partial matches with 3 matches", 3, e._Engine__get_partial_matches([3, 4, 0, 2]))117 test_validate("Testing partial matches with 4 matches", 4, e._Engine__get_partial_matches([3, 4, 1, 2]))118'''119Test the game iterate function when winning120'''121def test_game_iterate_win():122 e = Engine()123 e._Engine__code = [1, 2, 3, 4]124 e._Engine__rows = 4125 res = e._Engine__game_iterate([0, 1, 2, 3])126 test_validate("Testing full matches at 1st win iteration", 0, res["full_matches"])127 test_validate("Testing partial matches at 1st win iteration", 3, res["partial_matches"])128 test_validate("Testing game over at 1st win iteration", False, e._Engine__game_over)129 test_validate("Testing win at 1st win iteration", False, e._Engine__win)130 test_validate("Testing game row at 1st win iteration", 1, e._Engine__crt_row)131 res = e._Engine__game_iterate([1, 1, 2, 3])132 test_validate("Testing full matches at 2nd win iteration", 1, res["full_matches"])133 test_validate("Testing partial matches at 2nd win iteration", 2, res["partial_matches"])134 test_validate("Testing game over at 2nd win iteration", False, e._Engine__game_over)135 test_validate("Testing win at 2nd win iteration", False, e._Engine__win)136 test_validate("Testing game row at 2nd win iteration", 2, e._Engine__crt_row)137 res = e._Engine__game_iterate([1, 2, 2, 3])138 test_validate("Testing full matches at 3rd win iteration", 2, res["full_matches"])139 test_validate("Testing partial matches at 3rd win iteration", 1, res["partial_matches"])140 test_validate("Testing game over at 3rd win iteration", False, e._Engine__game_over)141 test_validate("Testing win at 3rd win iteration", False, e._Engine__win)142 test_validate("Testing game row at 3rd win iteration", 3, e._Engine__crt_row)143 res = e._Engine__game_iterate([1, 2, 3, 4])144 test_validate("Testing full matches at 4th win iteration", 4, res["full_matches"])145 test_validate("Testing partial matches at 4th win iteration", 0, res["partial_matches"])146 test_validate("Testing game over at 4th win iteration", True, e._Engine__game_over)147 test_validate("Testing win at 4th win iteration", True, e._Engine__win)148 test_validate("Testing game row at 4th win iteration", 4, e._Engine__crt_row)149'''150Test the game iterate function when losing151'''152def test_game_iterate_lose():153 e = Engine()154 e._Engine__code = [1, 2, 3, 4]155 e._Engine__rows = 4156 res = e._Engine__game_iterate([4, 3, 2, 1])157 test_validate("Testing full matches at 1st lose iteration", 0, res["full_matches"])158 test_validate("Testing partial matches at 1st lose iteration", 4, res["partial_matches"])159 test_validate("Testing game over at 1st lose iteration", False, e._Engine__game_over)160 test_validate("Testing win at 1st lose iteration", False, e._Engine__win)161 test_validate("Testing game row at 1st lose iteration", 1, e._Engine__crt_row)162 res = e._Engine__game_iterate([0, 3, 1, 2])163 test_validate("Testing full matches at 2nd lose iteration", 0, res["full_matches"])164 test_validate("Testing partial matches at 2nd lose iteration", 3, res["partial_matches"])165 test_validate("Testing game over at 2nd lose iteration", False, e._Engine__game_over)166 test_validate("Testing win at 2nd lose iteration", False, e._Engine__win)167 test_validate("Testing game row at 2nd lose iteration", 2, e._Engine__crt_row)168 res = e._Engine__game_iterate([1, 2, 2, 3])169 test_validate("Testing full matches at 3rd lose iteration", 2, res["full_matches"])170 test_validate("Testing partial matches at 3rd lose iteration", 1, res["partial_matches"])171 test_validate("Testing game over at 3rd lose iteration", False, e._Engine__game_over)172 test_validate("Testing win at 3rd lose iteration", False, e._Engine__win)173 test_validate("Testing game row at 3rd lose iteration", 3, e._Engine__crt_row)174 res = e._Engine__game_iterate([1, 2, 3, 0])175 test_validate("Testing full matches at 4th lose iteration", 3, res["full_matches"])176 test_validate("Testing partial matches at 4th lose iteration", 0, res["partial_matches"])177 test_validate("Testing game over at 4th lose iteration", True, e._Engine__game_over)178 test_validate("Testing win at 4th lose iteration", False, e._Engine__win)179 test_validate("Testing game row at 4th lose iteration", 4, e._Engine__crt_row)180if __name__ == "__main__":181 test_valid_rows()182 test_valid_variations()183 test_valid_code()184 test_valid_random_code()185 test_valid_pegs()186 test_full_matches()187 test_partial_matches()188 test_game_iterate_win()...
test_config.py
Source:test_config.py
...29 'engine': self.engine_test_conf,30 'kafka': self.kafka_test_conf,31 'spark': self.spark_test_conf32 })33 def test_validate(self):34 pass35class TestBaskervilleConfig(unittest.TestCase):36 def setUp(self):37 pass38 # def test_instance(self):39 # raise NotImplementedError()40 #41 # def test_validate(self):42 # raise NotImplementedError()43class TestEngineConfig(unittest.TestCase):44 def setUp(self):45 pass46 # def test_instance(self):47 # raise NotImplementedError()48 #49 # def test_validate(self):50 # raise NotImplementedError()51class TestAutoConfig(unittest.TestCase):52 def setUp(self):53 pass54 # def test_instance(self):55 # raise NotImplementedError()56 #57 # def test_validate(self):58 # raise NotImplementedError()59class TestManualConfig(unittest.TestCase):60 def setUp(self):61 pass62 # def test_instance(self):63 # raise NotImplementedError()64 #65 # def test_validate(self):66 # raise NotImplementedError()67class TestSimulationConfig(unittest.TestCase):68 def setUp(self):69 pass70 # def test_instance(self):71 # raise NotImplementedError()72 #73 # def test_validate(self):74 # raise NotImplementedError()75class TestElasticConfig(unittest.TestCase):76 def setUp(self):77 pass78 # def test_instance(self):79 # raise NotImplementedError()80 #81 # def test_validate(self):82 # raise NotImplementedError()83class TestDatabaseConfig(unittest.TestCase):84 def setUp(self):85 pass86 # def test_instance(self):87 # raise NotImplementedError()88 #89 # def test_validate(self):90 # raise NotImplementedError()91class TestKafkaConfig(unittest.TestCase):92 def setUp(self):93 pass94 # def test_instance(self):95 # raise NotImplementedError()96 #97 # def test_validate(self):98 # raise NotImplementedError()99class TestSparkConfig(unittest.TestCase):100 def setUp(self):101 pass102 # def test_instance(self):103 # raise NotImplementedError()104 #105 # def test_validate(self):...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!