<commit_before>Testify - Thou shalt write tests
================================

Go code (golang) set of packages that provide many tools for testifying that your code will behave as you intend.

  * Easy assertions
  * Mocking
  * HTTP response trapping

Read the API documentation: http://go.pkgdoc.org/github.com/stretchrcom/testify

`assert` package
----------------

The `assert` package provides some helpful methods that allow you to write better test code in Go.

See it in action:

    func TestSomething(t *testing.T) {
   
   	  // assert equality
      assert.Equal(t, 123, 123, "they should be equal")

      // assert inequality
      assert.NotEqual(t, 123, 456, "they should not be equal")

      // assert for nil (good for errors)
      assert.Nil(t, object)

      // assert for not nil (good when you expect something)
      if assert.NotNil(t, object) {

      	// now we know that object isn't nil, we are safe to make
      	// further assertions without causing any errors
        assert.Equal(t, "Something", object.Value)

      }

    }

  * Every assert func takes the `testing.T` object as the first argument.  This is how it writes the errors out through the normal `go test` capabilities.
  * Every assert func returns a bool indicating whether the assertion was successful or not, this is useful for if you want to go on making further assertions under certain conditions.

`http` package
--------------

The `http` package contains test objects useful for testing code that relies on the `net/http` package.

`mock` package
--------------

The `mock` package provides a mechanism for easily writing mock objects that can be used in place of real objects when writing test code.

For more information on how to write mock code, check out the API documentation for the `mock` package.
<commit_msg>added link to testing info for go<commit_after>Testify - Thou shalt write tests
================================

Go code (golang) set of packages that provide many tools for testifying that your code will behave as you intend.

  * Easy assertions
  * Mocking
  * HTTP response trapping

Read the API documentation: http://go.pkgdoc.org/github.com/stretchrcom/testify

For an introduction to writing test code in Go, see http://golang.org/doc/code.html#Testing

`assert` package
----------------

The `assert` package provides some helpful methods that allow you to write better test code in Go.

See it in action:

    func TestSomething(t *testing.T) {
   
   	  // assert equality
      assert.Equal(t, 123, 123, "they should be equal")

      // assert inequality
      assert.NotEqual(t, 123, 456, "they should not be equal")

      // assert for nil (good for errors)
      assert.Nil(t, object)

      // assert for not nil (good when you expect something)
      if assert.NotNil(t, object) {

      	// now we know that object isn't nil, we are safe to make
      	// further assertions without causing any errors
        assert.Equal(t, "Something", object.Value)

      }

    }

  * Every assert func takes the `testing.T` object as the first argument.  This is how it writes the errors out through the normal `go test` capabilities.
  * Every assert func returns a bool indicating whether the assertion was successful or not, this is useful for if you want to go on making further assertions under certain conditions.

`http` package
--------------

The `http` package contains test objects useful for testing code that relies on the `net/http` package.

`mock` package
--------------

The `mock` package provides a mechanism for easily writing mock objects that can be used in place of real objects when writing test code.

For more information on how to write mock code, check out the API documentation for the `mock` package.

{'fraction_non_alphanumeric': 0.1020949350304959, 'fraction_numerical': 0.006364359586316627, 'mean_word_length': 3.0, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4766250', 'n_tokens_mistral': 1003, 'n_tokens_neox': 938, 'n_words': 495}