<commit_before>``test.mysqld`` automatically setups a mysqld instance in a temporary directory, and destroys it after testing

Install
=======
Use easy_install (or pip)::

   $ easy_install test.mysqld

And ``test.mysqld`` requires MySQL server in your PATH.


Usage
=====
Create MySQL instance using ``test.mysqld.Mysqld``::

  import test.mysqld
  mysqld = test.mysqld.Mysqld()  # Lanuch new MySQL server

  import _mysql
  db = _mysql.connect(**mysqld.dsn())
  #
  # do any tests using MySQL...
  #

  del mysqld                     # Terminate MySQL server


``test.mysqld.Mysqld`` executes ``mysql_install_db`` and ``mysqld`` on instantiation.
On deleting Mysqld object, it terminates MySQL instance and removes temporary directory.

If you want a database including tables and any fixtures for your apps,
use ``copy_data_from`` keyword::

  # uses a copy of specified data directory of MySQL.
  mysqld = test.mysqld.Mysqld(copy_data_from='/path/to/your/database')


You can specify parameters for MySQL with ``my_cnf`` keyword::

  # boot MySQL server without socket listener (use unix-domain socket) 
  mysqld = test.mysqld.Mysqld(my_cnf={'skip-networking': None})


For example, you can setup new MySQL server for each testcases on setUp() method::

  import unittest
  import test.mysqld

  class MyTestCase(unittest.TestCase):
      def setUp(self):
          self.mysqld = test.mysqld.Mysqld(my_cnf={'skip-networking': None})


Requirements
============
* Python 2.7, 3.3
* pymysql

License
=======
Apache License 2.0


History
=======

1.0.0 (2013-10-16)
-------------------
* First release<commit_msg>Update release date in README<commit_after>``test.mysqld`` automatically setups a mysqld instance in a temporary directory, and destroys it after testing

Install
=======
Use easy_install (or pip)::

   $ easy_install test.mysqld

And ``test.mysqld`` requires MySQL server in your PATH.


Usage
=====
Create MySQL instance using ``test.mysqld.Mysqld``::

  import test.mysqld
  mysqld = test.mysqld.Mysqld()  # Lanuch new MySQL server

  import _mysql
  db = _mysql.connect(**mysqld.dsn())
  #
  # do any tests using MySQL...
  #

  del mysqld                     # Terminate MySQL server


``test.mysqld.Mysqld`` executes ``mysql_install_db`` and ``mysqld`` on instantiation.
On deleting Mysqld object, it terminates MySQL instance and removes temporary directory.

If you want a database including tables and any fixtures for your apps,
use ``copy_data_from`` keyword::

  # uses a copy of specified data directory of MySQL.
  mysqld = test.mysqld.Mysqld(copy_data_from='/path/to/your/database')


You can specify parameters for MySQL with ``my_cnf`` keyword::

  # boot MySQL server without socket listener (use unix-domain socket) 
  mysqld = test.mysqld.Mysqld(my_cnf={'skip-networking': None})


For example, you can setup new MySQL server for each testcases on setUp() method::

  import unittest
  import test.mysqld

  class MyTestCase(unittest.TestCase):
      def setUp(self):
          self.mysqld = test.mysqld.Mysqld(my_cnf={'skip-networking': None})


Requirements
============
* Python 2.7, 3.3
* pymysql

License
=======
Apache License 2.0


History
=======

1.0.0 (2013-10-17)
-------------------
* First release
{'fraction_non_alphanumeric': 0.1282367447595561, 'fraction_numerical': 0.010480887792848335, 'mean_word_length': 3.7097242380261246, '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': '4836186', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1019, 'n_words': 331}