-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusing-pytest-testing-tool-to-test-python-code-by-configuring-pycharm-ide.html
More file actions
938 lines (877 loc) · 48.8 KB
/
using-pytest-testing-tool-to-test-python-code-by-configuring-pycharm-ide.html
File metadata and controls
938 lines (877 loc) · 48.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
<!DOCTYPE html>
<html lang="english" prefix="og: http://ogp.me/ns# fb: https://www.facebook.com/2008/fbml">
<head>
<title>Using pytest Testing Tool to test Python Code by Configuring PyCharm IDE - Software Artist</title>
<!-- Using the latest rendering mode for IE -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
/*some stuff for output/input prompts*/
div.cell{border:1px solid transparent;display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;display:flex;flex-direction:column;align-items:stretch}div.cell.selected{border-radius:4px;border:thin #ababab solid}
div.cell.edit_mode{border-radius:4px;border:thin #008000 solid}
div.cell{width:100%;padding:5px 5px 5px 0;margin:0;outline:none}
div.prompt{min-width:11ex;padding:.4em;margin:0;font-family:monospace;text-align:right;line-height:1.21429em}
@media (max-width:480px){div.prompt{text-align:left}}div.inner_cell{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;display:flex;flex-direction:column;align-items:stretch;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;flex:1}
div.input_area{border:1px solid #cfcfcf;border-radius:4px;background:#f7f7f7;line-height:1.21429em}
div.prompt:empty{padding-top:0;padding-bottom:0}
div.input{page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;}
div.inner_cell{width:90%;}
div.input_area{border:1px solid #cfcfcf;border-radius:4px;background:#f7f7f7;}
div.input_prompt{color:navy;border-top:1px solid transparent;}
div.output_wrapper{margin-top:5px;position:relative;display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;width:100%;}
div.output_scroll{height:24em;width:100%;overflow:auto;border-radius:4px;-webkit-box-shadow:inset 0 2px 8px rgba(0, 0, 0, 0.8);-moz-box-shadow:inset 0 2px 8px rgba(0, 0, 0, 0.8);box-shadow:inset 0 2px 8px rgba(0, 0, 0, 0.8);}
div.output_collapsed{margin:0px;padding:0px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;width:100%;}
div.out_prompt_overlay{height:100%;padding:0px 0.4em;position:absolute;border-radius:4px;}
div.out_prompt_overlay:hover{-webkit-box-shadow:inset 0 0 1px #000000;-moz-box-shadow:inset 0 0 1px #000000;box-shadow:inset 0 0 1px #000000;background:rgba(240, 240, 240, 0.5);}
div.output_prompt{color:darkred;}
a.anchor-link:link{text-decoration:none;padding:0px 20px;visibility:hidden;}
h1:hover .anchor-link,h2:hover .anchor-link,h3:hover .anchor-link,h4:hover .anchor-link,h5:hover .anchor-link,h6:hover .anchor-link{visibility:visible;}
/* end stuff for output/input prompts*/
.highlight-ipynb .hll { background-color: #ffffcc }
.highlight-ipynb { background: #f8f8f8; }
.highlight-ipynb .c { color: #408080; font-style: italic } /* Comment */
.highlight-ipynb .err { border: 1px solid #FF0000 } /* Error */
.highlight-ipynb .k { color: #008000; font-weight: bold } /* Keyword */
.highlight-ipynb .o { color: #666666 } /* Operator */
.highlight-ipynb .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.highlight-ipynb .cp { color: #BC7A00 } /* Comment.Preproc */
.highlight-ipynb .c1 { color: #408080; font-style: italic } /* Comment.Single */
.highlight-ipynb .cs { color: #408080; font-style: italic } /* Comment.Special */
.highlight-ipynb .gd { color: #A00000 } /* Generic.Deleted */
.highlight-ipynb .ge { font-style: italic } /* Generic.Emph */
.highlight-ipynb .gr { color: #FF0000 } /* Generic.Error */
.highlight-ipynb .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight-ipynb .gi { color: #00A000 } /* Generic.Inserted */
.highlight-ipynb .go { color: #888888 } /* Generic.Output */
.highlight-ipynb .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.highlight-ipynb .gs { font-weight: bold } /* Generic.Strong */
.highlight-ipynb .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight-ipynb .gt { color: #0044DD } /* Generic.Traceback */
.highlight-ipynb .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.highlight-ipynb .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.highlight-ipynb .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.highlight-ipynb .kp { color: #008000 } /* Keyword.Pseudo */
.highlight-ipynb .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.highlight-ipynb .kt { color: #B00040 } /* Keyword.Type */
.highlight-ipynb .m { color: #666666 } /* Literal.Number */
.highlight-ipynb .s { color: #BA2121 } /* Literal.String */
.highlight-ipynb .na { color: #7D9029 } /* Name.Attribute */
.highlight-ipynb .nb { color: #008000 } /* Name.Builtin */
.highlight-ipynb .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.highlight-ipynb .no { color: #880000 } /* Name.Constant */
.highlight-ipynb .nd { color: #AA22FF } /* Name.Decorator */
.highlight-ipynb .ni { color: #999999; font-weight: bold } /* Name.Entity */
.highlight-ipynb .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.highlight-ipynb .nf { color: #0000FF } /* Name.Function */
.highlight-ipynb .nl { color: #A0A000 } /* Name.Label */
.highlight-ipynb .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.highlight-ipynb .nt { color: #008000; font-weight: bold } /* Name.Tag */
.highlight-ipynb .nv { color: #19177C } /* Name.Variable */
.highlight-ipynb .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.highlight-ipynb .w { color: #bbbbbb } /* Text.Whitespace */
.highlight-ipynb .mf { color: #666666 } /* Literal.Number.Float */
.highlight-ipynb .mh { color: #666666 } /* Literal.Number.Hex */
.highlight-ipynb .mi { color: #666666 } /* Literal.Number.Integer */
.highlight-ipynb .mo { color: #666666 } /* Literal.Number.Oct */
.highlight-ipynb .sb { color: #BA2121 } /* Literal.String.Backtick */
.highlight-ipynb .sc { color: #BA2121 } /* Literal.String.Char */
.highlight-ipynb .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.highlight-ipynb .s2 { color: #BA2121 } /* Literal.String.Double */
.highlight-ipynb .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.highlight-ipynb .sh { color: #BA2121 } /* Literal.String.Heredoc */
.highlight-ipynb .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.highlight-ipynb .sx { color: #008000 } /* Literal.String.Other */
.highlight-ipynb .sr { color: #BB6688 } /* Literal.String.Regex */
.highlight-ipynb .s1 { color: #BA2121 } /* Literal.String.Single */
.highlight-ipynb .ss { color: #19177C } /* Literal.String.Symbol */
.highlight-ipynb .bp { color: #008000 } /* Name.Builtin.Pseudo */
.highlight-ipynb .vc { color: #19177C } /* Name.Variable.Class */
.highlight-ipynb .vg { color: #19177C } /* Name.Variable.Global */
.highlight-ipynb .vi { color: #19177C } /* Name.Variable.Instance */
.highlight-ipynb .il { color: #666666 } /* Literal.Number.Integer.Long */
</style>
<style type="text/css">
/* Overrides of notebook CSS for static HTML export */
div.entry-content {
overflow: visible;
padding: 8px;
}
.input_area {
padding: 0.2em;
}
a.heading-anchor {
white-space: normal;
}
.rendered_html
code {
font-size: .8em;
}
pre.ipynb {
color: black;
background: #f7f7f7;
border: none;
box-shadow: none;
margin-bottom: 0;
padding: 0;
margin: 0px;
font-size: 13px;
}
/* remove the prompt div from text cells */
div.text_cell .prompt {
display: none;
}
/* remove horizontal padding from text cells, */
/* so it aligns with outer body text */
div.text_cell_render {
padding: 0.5em 0em;
}
img.anim_icon{padding:0; border:0; vertical-align:middle; -webkit-box-shadow:none; -box-shadow:none}
div.collapseheader {
width=100%;
padding: 2px;
cursor: pointer;
font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML" type="text/javascript"></script>
<script type="text/javascript">
init_mathjax = function() {
if (window.MathJax) {
// MathJax loaded
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
},
displayAlign: 'left', // Change this to 'center' to center equations.
"HTML-CSS": {
styles: {'.MathJax_Display': {"margin": 0}}
}
});
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
}
}
init_mathjax();
</script>
<link rel="canonical" href="https://www.gowrishankarnath.com/using-pytest-testing-tool-to-test-python-code-by-configuring-pycharm-ide.html">
<meta name="author" content="Gowrishankar S." />
<meta name="keywords" content="PyCharm,pytest,Python,Testing" />
<meta name="description" content="This article is about testing Python code using pytest Testing tool by configuring the PyCharm IDE" />
<meta property="og:site_name" content="Software Artist" />
<meta property="og:type" content="article"/>
<meta property="og:title" content="Using pytest Testing Tool to test Python Code by Configuring PyCharm IDE"/>
<meta property="og:url" content="https://www.gowrishankarnath.com/using-pytest-testing-tool-to-test-python-code-by-configuring-pycharm-ide.html"/>
<meta property="og:description" content="This article is about testing Python code using pytest Testing tool by configuring the PyCharm IDE"/>
<meta property="article:published_time" content="2015-10-28" />
<meta property="article:section" content="Articles" />
<meta property="article:tag" content="PyCharm" />
<meta property="article:tag" content="pytest" />
<meta property="article:tag" content="Python" />
<meta property="article:tag" content="Testing" />
<meta property="article:author" content="Gowrishankar S." />
<!-- Bootstrap -->
<link rel="stylesheet" href="https://www.gowrishankarnath.com/theme/css/bootstrap.simplex.min.css" type="text/css"/>
<link href="https://www.gowrishankarnath.com/theme/css/font-awesome.min.css" rel="stylesheet">
<link href="https://www.gowrishankarnath.com/theme/css/pygments/native.css" rel="stylesheet">
<link href="https://www.gowrishankarnath.com/theme/tipuesearch/tipuesearch.css" rel="stylesheet">
<link href="https://www.gowrishankarnath.com/theme/css/typogrify.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.gowrishankarnath.com/theme/css/style.css" type="text/css"/>
<link href="https://www.gowrishankarnath.com/static/custom.css" rel="stylesheet">
<link href="https://www.gowrishankarnath.com/feeds/all.atom.xml" type="application/atom+xml" rel="alternate"
title="Software Artist ATOM Feed"/>
<link href="https://www.gowrishankarnath.com/feeds/all.rss.xml" type="application/rss+xml" rel="alternate"
title="Software Artist RSS Feed"/>
<link href="https://www.gowrishankarnath.com/category/{slug}/feeds/atom.xml" type="application/atom+xml" rel="alternate"
title="Software Artist Articles ATOM Feed"/>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="https://www.gowrishankarnath.com/" class="navbar-brand">
<img class="img-responsive pull-left gap-right" src="https://www.gowrishankarnath.com/images/logo.jpg" width=""/> Software Artist </a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li><a href="https://www.gowrishankarnath.com/about.html">
About
</a></li>
<li><a href="https://www.gowrishankarnath.com/awards.html">
Awards
</a></li>
<li><a href="https://www.gowrishankarnath.com/books.html">
Books
</a></li>
<li><a href="https://www.gowrishankarnath.com/consultancy.html">
Consultancy
</a></li>
<li><a href="https://www.gowrishankarnath.com/contact.html">
Contact
</a></li>
<li><a href="https://www.gowrishankarnath.com/disclaimer.html">
Disclaimer
</a></li>
<li><a href="https://www.gowrishankarnath.com/patents.html">
Patents
</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><span>
<form class="navbar-search" action="/search">
<input type="text" class="search-query" placeholder="Search" name="q" id="tipue_search_input" required>
</form></span>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
</div> <!-- /.navbar -->
<!-- Banner -->
<style>
#banner{
background-image:url("https://www.gowrishankarnath.com/images/banner.jpg");
}
</style>
<div id="banner">
<div class="container-fluid">
<div class="copy">
<h1>Software Artist</h1>
<p class="intro">My Thoughts, My Learning</p>
</div>
</div>
</div><!-- End Banner -->
<!-- Content Container -->
<div class="container-fluid">
<div class="row">
<div class="col-sm-9">
<section id="content">
<article>
<header class="page-header">
<h1>
<a href="https://www.gowrishankarnath.com/using-pytest-testing-tool-to-test-python-code-by-configuring-pycharm-ide.html"
rel="bookmark"
title="Permalink to Using pytest Testing Tool to test Python Code by Configuring PyCharm IDE">
Using pytest Testing Tool to test Python Code by Configuring PyCharm <span class="caps">IDE</span>
</a>
</h1>
</header>
<div class="entry-content">
<div class="panel">
<div class="panel-body">
<footer class="post-info">
<span class="label label-default">Date</span>
<span class="published">
<i class="fa fa-calendar"></i><time datetime="2015-10-28T13:30:00+05:30"> Wed 28 October 2015</time>
</span>
<span class="label label-default">Tags</span>
<a href="https://www.gowrishankarnath.com/tag/pycharm.html">PyCharm</a>
/
<a href="https://www.gowrishankarnath.com/tag/pytest.html">pytest</a>
/
<a href="https://www.gowrishankarnath.com/tag/python.html">Python</a>
/
<a href="https://www.gowrishankarnath.com/tag/testing.html">Testing</a>
</footer><!-- /.post-info --> </div>
</div>
<h3><font color = black> <strong>Introduction </strong> </font></h3>
<p>The aim of this article is to bring all the related information of configuring the PyCharm <span class="caps">IDE</span> with pytest Testing Tool in one place. Here, I’ll not dwell deep into how testing is done in Python. But I’ll discuss the proper way of configuring PyCharm <span class="caps">IDE</span> with pytest testing tool to get the things up and running. This article is tested on a Windows 10 machine running PyCharm Professional Edition 4.5 with Python 2.7.9 interpreter. </p>
<h3><font color = black> <strong>Background </strong> </font></h3>
<p>PyCharm is a popular <span class="caps">IDE</span> for Python Programming. More information about PyCharm can be obtained at <a href="https://www.jetbrains.com/pycharm/" target="_blank" style="color: rgb(6,69,173)"><font color="#0066CC">https://www.jetbrains.com/pycharm/</font></a>. </p>
<p>As a rule, the code we develop should be thoroughly tested before its release. Testing is a very important topic and has been discussed in great detail in the fine material. More information about pytest testing tool can be obtained at <a href="http://pytest.org/" target="_blank" style="color: rgb(6,69,173)"><font color="#0066CC">http://pytest.org/.</font></a></p>
<p>To gain more knowledge about testing techniques in general please refer to below books. </p>
<ol>
<li>Clean Code: A Handbook of Agile Software Craftsmanship </li>
<li>Agile Testing: A Practical Guide for Testers and Agile Teams </li>
<li>Software Testing: A Craftsman’s Approach, Fourth Edition </li>
<li>Pragmatic Unit Testing in Java 8 with JUnit </li>
<li>Practical Unit Testing with JUnit and Mockito </li>
<li>Effective Unit Testing: A guide for Java developers </li>
<li>The Art of Unit Testing: with Examples in .<span class="caps">NET</span> </li>
</ol>
<p>Even though some of these books target other programming languages, still the knowledge that you gain from reading these books can be applied to Python Testing also. </p>
<h3>Steps Involved in Configuring PyCharm to work with pytest Testing Tool</h3>
<p>Here I assume that you have already configured your PyCharm <span class="caps">IDE</span> to run Python Interpreter. If not, you can download anaconda from <a href="https://www.anaconda.com/distribution/" target="_blank" style="color: rgb(6,69,173)"><font color="#0066CC">https://www.anaconda.com/distribution/</font></a> and use it to configure the Python interpreter in PyCharm <span class="caps">IDE</span>. </p>
<p><strong>Step 1:</strong> In order to follow this tutorial, create a folder called <strong>PyArticle</strong> in C: drive. Install <strong>pytest</strong> testing tool using <strong>pip</strong> command as shown below. </p>
<p><img alt="Image_1" src="../images/article_7_image_1.png"> </p>
<p><strong>Step 2:</strong> Invoke PyCharm <span class="caps">IDE</span> and go to File -> New Project. Specify the path to the folder you created and also specify the name of the project. In our case the name of the project is TestExample. Press Create button. This takes you to the PyCharm editor. </p>
<p><img alt="Image_1" src="../images/article_7_image_2.png"> </p>
<p><strong>Step 3:</strong> Right Click on TestExample folder on the left pane of the PyCharm editor. Select New -> Python File </p>
<p><img alt="Image_1" src="../images/article_7_image_3.png"> </p>
<p><strong>Step 4:</strong> Give the file name as add_two_numbers </p>
<p><img alt="Image_1" src="../images/article_7_image_4.png"> </p>
<p><strong>Step 5:</strong> Write the below given code in add_two_numbers.py file. This is a very simple code that adds up two numbers and returns the result. </p>
<p><img alt="Image_1" src="../images/article_7_image_5.png"> </p>
<p><strong>Step 6:</strong> Now go to File -> Settings </p>
<p><img alt="Image_1" src="../images/article_7_image_6.png"> </p>
<p><strong>Step 7:</strong> In the Settings window, click on Python Integrated Tools in the right pane and select py.test as the Default test runner. Click on <span class="caps">OK</span> button. </p>
<p><img alt="Image_1" src="../images/article_7_image_7.png"> </p>
<p><strong>Step 8:</strong> Now right click on TestExample directory and select New -> Directory. </p>
<p><img alt="Image_1" src="../images/article_7_image_8.png"> </p>
<p><strong>Step 9:</strong> Enter the directory name as Tests. We will have all our test files in a separate directory which is a good practice. </p>
<p><img alt="Image_1" src="../images/article_7_image_9.png"> </p>
<p><strong>Step 10:</strong> Right click on Tests directory and select New -> Python File. </p>
<p><img alt="Image_1" src="../images/article_7_image_10.png"> </p>
<p><strong>Step 11:</strong> Give the file name as test_add_two_numbers and click <span class="caps">OK</span>. </p>
<p><img alt="Image_1" src="../images/article_7_image_11.png"> </p>
<p><strong>Step 12:</strong> Write the below code in test_add_two_numbers.py file. Notice that the word <strong>test_</strong> has been prefixed for the test method. </p>
<p><strong>All test methods should start with test_.</strong></p>
<p>This is a very important step in the configuration and if the test method doesn’t start with test_ then you won’t be able to get proper output.</p>
<p><strong>assert</strong> is used to check whether the condition is True or False.</p>
<p><img alt="Image_1" src="../images/article_7_image_12.png"> </p>
<p><strong>Step 13:</strong> Go to Run -> Edit Configurations. </p>
<p><img alt="Image_1" src="../images/article_7_image_13.png"> </p>
<p><strong>Step 14:</strong> In the Run/Debug Configurations window click on the <strong>+</strong> button found on the upper left corner. Go to Python tests and select py.test. Click <span class="caps">OK</span> button. </p>
<p><img alt="Image_1" src="../images/article_7_image_14.png"> </p>
<p><strong>Step 15:</strong> On the left pane you can see Python tests is created. In the right pane for the <strong>Name</strong> text box give the value as <strong>py.test in test_add_two_numbers.py</strong> You should always prefix the Python test file name with the words py.test in. </p>
<p>For the Target text box specify the path to the Python test file. </p>
<p>For the Working directory text box specify the path to the directory which has the Python test files. </p>
<p>Click on <span class="caps">OK</span> button. </p>
<p><img alt="Image_1" src="../images/article_7_image_15.png"> </p>
<p><strong>Step 16:</strong> Right click on the Python test file and select Run. As you can see in the Test Results the green color indicates that the test has successfully passed. </p>
<p><img alt="Image_1" src="../images/article_7_image_16.png"> </p>
<p><strong>Step 17:</strong> What if you want to specify more than one test method? Lets find out the process to achieve the same. Create another python file called multiply_two_numbers and fill it up with the code shown below. </p>
<p><img alt="Image_1" src="../images/article_7_image_17.png"> </p>
<p>Create another Python test file called test_queue_example. </p>
<p><img alt="Image_1" src="../images/article_7_image_18.png"> </p>
<p>Fill it up with the code shown below. </p>
<p><img alt="Image_1" src="../images/article_7_image_19.png"> </p>
<p>While configuring the Python test file as shown in <strong>Step 13 – 15</strong> check the <strong>Options</strong> check box and give the value as <strong>-q</strong>. Here <strong>q</strong> stands for queue. </p>
<p><img alt="Image_1" src="../images/article_7_image_20.png"> </p>
<p>Click on <span class="caps">OK</span> button after all the configurations are done. </p>
<p><img alt="Image_1" src="../images/article_7_image_21.png"> </p>
<p>Now right click on the latest test file and run. As you can see one test got passed while the other got failed. </p>
<p><img alt="Image_1" src="../images/article_7_image_22.png"> </p>
<p>Change the code in test_queue_example as shown below and run the test program again. You can see that both the tests have passed. </p>
<p><img alt="Image_1" src="../images/article_7_image_23.png"> </p>
<p><strong>Happy Coding!!! </strong></p>
<h3><font color = black> <strong>Points of Interest </strong> </font></h3>
<p>Testing our code is a very important aspect of software development. Using testing tools like pytest along with PyCharm <span class="caps">IDE</span> goes in a long way in developing quality code. </p>
</div>
<!-- /.entry-content -->
<hr/>
<section class="comments" id="comments">
<h2>Comments</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'https-gowrishankarnath-github-io-2'; // required: replace example with your forum shortname
var disqus_config = function () {
this.language = "english";
this.page.identifier = '2015-10-28-using-pytest-testing-tool-to-test-python-code-by-configuring-pycharm-ide';
this.page.url = 'https://www.gowrishankarnath.com/using-pytest-testing-tool-to-test-python-code-by-configuring-pycharm-ide.html';
};
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by
Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</section>
</article>
</section>
</div>
<div class="col-sm-3" id="sidebar">
<aside>
<!-- Sidebar -->
<section class="well well-sm">
<ul class="list-group list-group-flush">
<!-- Sidebar/Social -->
<li class="list-group-item">
<h4><i class="fa fa-home fa-lg"></i><span class="icon-label">Social</span></h4>
<ul class="list-group" id="social">
<li class="list-group-item"><a href="http://twitter.com/g_s_nath"><i class="fa fa-twitter-square fa-lg"></i> Twitter</a></li>
<li class="list-group-item"><a href="http://www.linkedin.com/in/gowrishankarnath"><i class="fa fa-linkedin-square fa-lg"></i> Linkedin</a></li>
<li class="list-group-item"><a href="http://github.com/gowrishankarnath"><i class="fa fa-github-square fa-lg"></i> GitHub</a></li>
<li class="list-group-item"><a href="http://gowrishankarnath.com/feeds/all.rss.xml"><i class="fa fa-rss-square fa-lg"></i> RSS</a></li>
</ul>
</li>
<!-- End Sidebar/Social -->
<!-- Sidebar/Recent Posts -->
<li class="list-group-item">
<h4><i class="fa fa-home fa-lg"></i><span class="icon-label">Recent Posts</span></h4>
<ul class="list-group" id="recentposts">
<li class="list-group-item"><a href="https://www.gowrishankarnath.com/Call-for-Chapters-for-a-Book-titled-the-application-and-impact-of-data-science-on-sports-intelligence-with-apple-academic-press-Publishers.html">Call for Chapters for a Book titled “The Application and Impact of Data Science on Sports Intelligence” with Apple Academic Press</a></li>
<li class="list-group-item"><a href="https://www.gowrishankarnath.com/model-question-papers-for-foundations-of-devops-course.html">Model Question Papers for Foundations of DevOps Course</a></li>
<li class="list-group-item"><a href="https://www.gowrishankarnath.com/syllabus-for-foundations-of-devops-course-as-prescribed-for-3rd-semester-computer-science-and-engineering-programme.html">Syllabus for Foundations of Devops course as prescribed for 3rd semester Computer Science and Engineering programme</a></li>
<li class="list-group-item"><a href="https://www.gowrishankarnath.com/endless-python-tricks.html">Endless Python Tricks</a></li>
<li class="list-group-item"><a href="https://www.gowrishankarnath.com/Call-for-Chapters-for-a-Book-titled-DATA-SCIENCE-FOR-AGRICULTURE-INNOVATION-AND-PRODUCTIVITY-with-Bentham-Science-Publishers.html">Call for Chapters for a Book titled “<span class="caps">DATA</span> <span class="caps">SCIENCE</span> <span class="caps">FOR</span> <span class="caps">AGRICULTURE</span> <span class="caps">INNOVATION</span> <span class="caps">AND</span> <span class="caps">PRODUCTIVITY</span>” with Bentham Science Publishers (<span class="caps">UAE</span>)</a></li>
</ul>
</li>
<!-- End Sidebar/Recent Posts -->
<!-- Sidebar/Categories -->
<li class="list-group-item">
<h4><i class="fa fa-home fa-lg"></i><span class="icon-label">Categories</span></h4>
<ul class="list-group" id="categories">
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/category/article.html"><i class="fa fa-folder-open fa-lg"></i>Article</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/category/articles.html"><i class="fa fa-folder-open fa-lg"></i>Articles</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/category/book.html"><i class="fa fa-folder-open fa-lg"></i>Book</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/category/webinar.html"><i class="fa fa-folder-open fa-lg"></i>Webinar</a>
</li>
</ul>
</li>
<!-- End Sidebar/Categories -->
<!-- Sidebar/Tag Cloud -->
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/"><h4><i class="fa fa-tags fa-lg"></i><span class="icon-label">Tags</span></h4></a>
<ul class="list-group list-inline tagcloud" id="tags">
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/accreditation.html">Accreditation</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/agriculture.html">agriculture</a>
</li>
<li class="list-group-item tag-3">
<a href="https://www.gowrishankarnath.com/tag/aicte.html">aicte</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/analysis.html">analysis</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/apple.html">apple</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/appleacademicpress.html">appleacademicpress</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/artificialintelligence.html">artificialintelligence</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/biosystems.html">biosystems</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/blockchain.html">blockchain</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/book.html">book</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/bookchapter.html">bookchapter</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/callforbookchapters.html">callforbookchapters</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/certification.html">certification</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/co.html">CO</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/coding-gems.html">Coding-Gems</a>
</li>
<li class="list-group-item tag-1">
<a href="https://www.gowrishankarnath.com/tag/course.html">course</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/course-outcomes.html">Course Outcomes</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/crc-press.html">CRC Press</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/data.html">data</a>
</li>
<li class="list-group-item tag-3">
<a href="https://www.gowrishankarnath.com/tag/data-science.html">Data Science</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/dataanalytics.html">dataanalytics</a>
</li>
<li class="list-group-item tag-3">
<a href="https://www.gowrishankarnath.com/tag/database.html">Database</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/datascience.html">datascience</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/deep-learning.html">Deep Learning</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/deeplearning.html">deeplearning</a>
</li>
<li class="list-group-item tag-3">
<a href="https://www.gowrishankarnath.com/tag/devops.html">Devops</a>
</li>
<li class="list-group-item tag-1">
<a href="https://www.gowrishankarnath.com/tag/drait.html">Dr.AIT</a>
</li>
<li class="list-group-item tag-3">
<a href="https://www.gowrishankarnath.com/tag/economics.html">Economics</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/editedbook.html">editedbook</a>
</li>
<li class="list-group-item tag-3">
<a href="https://www.gowrishankarnath.com/tag/education.html">Education</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/faker.html">Faker</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/files.html">Files</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/folders.html">Folders</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/healthanalytics.html">healthanalytics</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/healthcare.html">healthcare</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/industry.html">industry</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/injuryprevention.html">injuryprevention</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/innovation.html">innovation</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/iot.html">iot</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/laboratory.html">Laboratory</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/livestock.html">livestock</a>
</li>
<li class="list-group-item tag-3">
<a href="https://www.gowrishankarnath.com/tag/machine-learning.html">Machine Learning</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/machinelearning.html">machinelearning</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/macroeconomics.html">Macroeconomics</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/mhrd.html">mhrd</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/microeconomics.html">Microeconomics</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/moocs.html">moocs</a>
</li>
<li class="list-group-item tag-3">
<a href="https://www.gowrishankarnath.com/tag/mysql.html">MySQL</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/mysql-workbench.html">MySQL Workbench</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/nba.html">NBA</a>
</li>
<li class="list-group-item tag-3">
<a href="https://www.gowrishankarnath.com/tag/nptel.html">nptel</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/obe.html">OBE</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/online.html">online</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/openstax.html">OpenStax</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/papers.html">Papers</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/patents.html">patents</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/plants.html">plants</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/po.html">PO</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/precisionagriculture.html">precisionagriculture</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/program-outcomes.html">Program Outcomes</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/programme.html">Programme</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/programming.html">programming</a>
</li>
<li class="list-group-item tag-3">
<a href="https://www.gowrishankarnath.com/tag/pycharm.html">PyCharm</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/pytest.html">pytest</a>
</li>
<li class="list-group-item tag-1">
<a href="https://www.gowrishankarnath.com/tag/python.html">Python</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/questions.html">questions</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/raspberry-pi.html">Raspberry Pi</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/remote-programming.html">Remote Programming</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/research.html">research</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/sar.html">SAR</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/scopus.html">scopus</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/scopusindexed.html">scopusindexed</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/soil.html">soil</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/sports.html">sports</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/sportsanalytics.html">sportsanalytics</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/sportsdata.html">sportsdata</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/sportsethics.html">sportsethics</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/sportsmedicine.html">sportsmedicine</a>
</li>
<li class="list-group-item tag-3">
<a href="https://www.gowrishankarnath.com/tag/startups.html">startups</a>
</li>
<li class="list-group-item tag-3">
<a href="https://www.gowrishankarnath.com/tag/swayam.html">swayam</a>
</li>
<li class="list-group-item tag-1">
<a href="https://www.gowrishankarnath.com/tag/syllabus.html">Syllabus</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/testing.html">Testing</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/topological.html">topological</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/traditional.html">traditional</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/ugc.html">ugc</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/vs-code.html">VS Code</a>
</li>
<li class="list-group-item tag-4">
<a href="https://www.gowrishankarnath.com/tag/vtu.html">VTU</a>
</li>
<li class="list-group-item tag-2">
<a href="https://www.gowrishankarnath.com/tag/webinar.html">webinar</a>
</li>
</ul>
</li>
<!-- End Sidebar/Tag Cloud -->
<!-- Sidebar/Images -->
<li class="list-group-item">
<ul class="list-group" id="links">
<img width="100%" class="img-thumbnail" src="/images/Front_Image.jpg"/>
</ul>
</li>
<!-- End Sidebar/Images -->
<!-- Sidebar/Archive -->
<li class="list-group-item">
<h4><i class="fa fa-home fa-lg"></i><span class="icon-label">Archive</span></h4>
<ul class="list-group" id="archive">
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2024/Mar/index.html"><i class="fa fa-calendar fa-lg"></i>March 2024 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2023/Dec/index.html"><i class="fa fa-calendar fa-lg"></i>December 2023 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2023/Nov/index.html"><i class="fa fa-calendar fa-lg"></i>November 2023 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2023/Jan/index.html"><i class="fa fa-calendar fa-lg"></i>January 2023 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2022/Jun/index.html"><i class="fa fa-calendar fa-lg"></i>June 2022 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2022/May/index.html"><i class="fa fa-calendar fa-lg"></i>May 2022 (2)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2021/Dec/index.html"><i class="fa fa-calendar fa-lg"></i>December 2021 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2021/May/index.html"><i class="fa fa-calendar fa-lg"></i>May 2021 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2020/Aug/index.html"><i class="fa fa-calendar fa-lg"></i>August 2020 (2)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2020/Jun/index.html"><i class="fa fa-calendar fa-lg"></i>June 2020 (4)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2019/Aug/index.html"><i class="fa fa-calendar fa-lg"></i>August 2019 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2019/May/index.html"><i class="fa fa-calendar fa-lg"></i>May 2019 (4)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2019/Jan/index.html"><i class="fa fa-calendar fa-lg"></i>January 2019 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2018/Feb/index.html"><i class="fa fa-calendar fa-lg"></i>February 2018 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2017/Feb/index.html"><i class="fa fa-calendar fa-lg"></i>February 2017 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2017/Jan/index.html"><i class="fa fa-calendar fa-lg"></i>January 2017 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2016/Dec/index.html"><i class="fa fa-calendar fa-lg"></i>December 2016 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2016/Jul/index.html"><i class="fa fa-calendar fa-lg"></i>July 2016 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2016/May/index.html"><i class="fa fa-calendar fa-lg"></i>May 2016 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2015/Dec/index.html"><i class="fa fa-calendar fa-lg"></i>December 2015 (1)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2015/Nov/index.html"><i class="fa fa-calendar fa-lg"></i>November 2015 (3)
</a>
</li>
<li class="list-group-item">
<a href="https://www.gowrishankarnath.com/2015/Oct/index.html"><i class="fa fa-calendar fa-lg"></i>October 2015 (1)
</a>
</li>
</ul>
</li>
<!-- End Sidebar/Archive -->
</ul>
</section>
<!-- End Sidebar --> </aside>
</div>
</div>
</div>
<!-- End Content Container -->
<footer>
<div class="container-fluid">
<hr>
<div class="row">
<div class="col-xs-10">© 2024 Gowrishankar S
· Powered by <a href="http://docs.getpelican.com/" target="_blank">Pelican</a> <p><small> <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.english"><img alt="Creative Commons License" style="border-width:0" src="//i.creativecommons.org/l/by-nc-sa/4.0/80x15.png" /></a>
Content
licensed under a <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.english">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>, except where indicated otherwise.
</small></p>
</div>
<div class="col-xs-2"><p class="pull-right"><i class="fa fa-arrow-up"></i> <a href="#">Back to top</a></p></div>
</div>
</div>
</footer>
<script src="https://www.gowrishankarnath.com/theme/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="https://www.gowrishankarnath.com/theme/js/bootstrap.min.js"></script>
<!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
<script src="https://www.gowrishankarnath.com/theme/js/respond.min.js"></script>
<script src="https://www.gowrishankarnath.com/theme/js/bodypadding.js"></script>
<!-- Disqus -->
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'https-gowrishankarnath-github-io-2'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script');
s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
<!-- End Disqus Code -->
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-131471615-1']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics Code -->
<script type="text/javascript">
jQuery(document).ready(function($) {
$("div.collapseheader").click(function () {
$header = $(this).children("span").first();
$codearea = $(this).children(".input_area");
console.log($(this).children());
$codearea.slideToggle(500, function () {
$header.text(function () {
return $codearea.is(":visible") ? "Collapse Code" : "Expand Code";
});
});
});
});
</script>
</body>
</html>