<commit_before>1 - Introduction
================
ptest is a light test runner for Python. With ptest, you can tag test classes & test cases by decorators, execute test cases by command line, and get clear reports.

Writing a test is typically a two-step process:

1. Write the business logic of your test and insert `ptest decorators <#2---decorators>`_ in your code.

2. `Run ptest <#3---running-ptest>`_.

The concepts used in this documentation are as follows:

- A suite is represented by one run of ptest.

- A ptest class is a python class which is decorated by **@TestClass**.

- A ptest group is a virtual container of tests under ptest class.

- A test method is a python method which is decorated by **@Test**.

A ptest test can be configured by **@BeforeXXX** and **@AfterXXX** decorators which allows to perform some Python logic before and after a certain point, these points being either of the items listed above.

The rest of this manual will explain the following:

- A list of all the decorators with a brief explanation.
- This will give you an idea of the various functionalities offered by ptest but you will probably want to consult the section dedicated to each of these decorators to learn the details.

2 - Decorators
==============
Here is a quick overview of the decorators available in ptest along with their attributes.

**@TestClass** - the decorated class will be marked as ptest class

- *enabled* - whether this test class is enabled

- *run_mode* - the run mode of all the test cases in this test class. If set to "parallel", all the test cases will be run by multiple threads. If set to "singleline", all the test cases will be only run by one thread.

- *description* - the description of this test class

- *custom_args* - the custom arguments of this test class

**@Test** - the decorated method will be marked as ptest test

- *enabled* - whether this test is enabled

- *tags* - the tags of this test (it can be string (separated by comma) or list or tuple)

- *group* - the group that this test is belong to

- *description* - the description of this test

- *timeout* - the timeout of this test (in seconds)

- *custom_args* - the custom arguments of this test
<commit_msg>Remove useless section in doc.<commit_after>1 - Introduction
================
ptest is a light test runner for Python. With ptest, you can tag test classes & test cases by decorators, execute test cases by command line, and get clear reports.

Writing a test is typically a two-step process:

1. Write the business logic of your test and insert `ptest decorators <#2---decorators>`_ in your code.

2. `Run ptest <#3---running-ptest>`_.

The concepts used in this documentation are as follows:

- A suite is represented by one run of ptest.

- A ptest class is a python class which is decorated by **@TestClass**.

- A ptest group is a virtual container of tests under ptest class.

- A test method is a python method which is decorated by **@Test**.

A ptest test can be configured by **@BeforeXXX** and **@AfterXXX** decorators which allows to perform some Python logic before and after a certain point, these points being either of the items listed above.

2 - Decorators
==============
Here is a quick overview of the decorators available in ptest along with their attributes.

**@TestClass** - the decorated class will be marked as ptest class

- *enabled* - whether this test class is enabled

- *run_mode* - the run mode of all the test cases in this test class. If set to "parallel", all the test cases will be run by multiple threads. If set to "singleline", all the test cases will be only run by one thread.

- *description* - the description of this test class

- *custom_args* - the custom arguments of this test class

**@Test** - the decorated method will be marked as ptest test

- *enabled* - whether this test is enabled

- *tags* - the tags of this test (it can be string (separated by comma) or list or tuple)

- *group* - the group that this test is belong to

- *description* - the description of this test

- *timeout* - the timeout of this test (in seconds)

- *custom_args* - the custom arguments of this test

{'fraction_non_alphanumeric': 0.08001928175463967, 'fraction_numerical': 0.0028922631959508315, 'mean_word_length': 3.7537227949599083, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4776182', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1075, 'n_words': 655}