<commit_before>    
    
1. Unit Testing - What is it?    
    a. Wikipedia - [Unit Testing](http://en.wikipedia.org/wiki/Unit_testing)    
    b. Python unittest builtin module - no setup required, just 'import unittest'    
    c. The paradigm: red, green, refactor.    
        i.   red - make a test, but don't write the code. The test obviously fails.    
        ii.  green - write the minimum code to pass the test. Verify the test passes.    
        iii. refactor - clean up the code. Follow: [PEP8](http://legacy.python.org/dev/peps/pep-0008/#maximum-line-length), [DRY](http://en.wikipedia.org/wiki/Don't_repeat_yourself), rule of three][http://en.wikipedia.org/wiki/Rule_of_three_[computer_programming]), etc.    
    d. How do we build a good test? That isn't a topic for today, but here are some ideas:    
        i.   break your code into testable subproblems.    
        ii.  too simple is bad, avoid testing builtins and standard library functions.    
        iii. build the test before any code is written, this is "Test DRIVEN Development"    
        iv.  This is just one way to code. You should know how to write a test, though.    
    
    
2. Lets build a tiny little unit testing framework.    
    a. Build a simple test, e.g. 1+1==2    
        i. The test isn't the focus yet.    
    b. Build some more tests (2 more today)    
        i. Two more tests in the same category.    
        ii. Simple math is best, we just want to get enough tests to see implementation patterns.    
    c. Now lets generalize. 4 things change in each test.    
        i. test name - although you could have different text for fail/success    
        ii. type of assert - we use only == to keep things simple    
        iii. left side of assert statement    
        iiii. right side of assert statement    
    d. Parts of our testing framework:    
        i.   test fixture - setup needed to build and breakdown a test - variables, databases, tcp connections, etc.    <commit_msg>Fixed link brackets in unittest.md<commit_after>    
    
1. Unit Testing - What is it?    

    a. Wikipedia - [Unit Testing](http://en.wikipedia.org/wiki/Unit_testing)    
    b. Python unittest builtin module - no setup required, just 'import unittest'    
    c. The paradigm: red, green, refactor.    
        i.   red - make a test, but don't write the code. The test obviously fails.    
        ii.  green - write the minimum code to pass the test. Verify the test passes.    
        iii. refactor - clean up the code. Follow: [PEP8](http://legacy.python.org/dev/peps/pep-0008/#maximum-line-length), [DRY](http://en.wikipedia.org/wiki/Don't_repeat_yourself), [rule of three](http://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)), etc.    
    d. How do we build a good test? That is too large a topic for today, but here are some ideas:    
        i.   break your code into testable subproblems.    
        ii.  too simple is bad, avoid testing builtins and standard library functions.    
        iii. build the test before any code is written, this is "Test DRIVEN Development"    
        iv.  This is just one way to code. You should know how to write a test, though.    
    
    
2. Lets build a tiny little unit testing framework.    
    a. Build a simple test, e.g. 1+1==2    
        i. The test isn't the focus yet.    
    b. Build some more tests (2 more today)    
        i. Two more tests in the same category.    
        ii. Simple math is best, we just want to get enough tests to see implementation patterns.    
    c. Now lets generalize. 4 things change in each test.    
        i. test name - although you could have different text for fail/success    
        ii. type of assert - we use only == to keep things simple    
        iii. left side of assert statement    
        iiii. right side of assert statement    
    d. Parts of our testing framework:    
        i.   test fixture - setup needed to build and breakdown a test - variables, databases, tcp connections, etc.    
{'fraction_non_alphanumeric': 0.07316468253968254, 'fraction_numerical': 0.005952380952380952, 'mean_word_length': 2.1581832419733753, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2917079', 'n_tokens_mistral': 1144, 'n_tokens_neox': 1097, 'n_words': 524}