Check decorator order
Author: sgugger
Pull request: yes

As @stas00 pointed out, the slow decorator is ignore if it's not put last. To make sure we don't make the mistake unintentionally and to fix the places where this si not the case, I wrote a script to check the decorators order and fail on `make quality` if there is a wrong order somewhere.


Comments:
@sgugger, let me investigate this. @slow should be the same as any other skip decorators, so the order there shouldn't matter. They should be able to stack up. If they don't, it's probably a bug somewhere.

It's possible that some other decorators don't play well with our skip decorators, which would require all the skip decorators to be in the last group. But all the ones under our control should be interchangeable order-wise.

I initially discovered this issue having `@slow`, followed by `@parametrized` and had to swap the order for `@slow` to work.

I will look at it today.

Thanks @stas00!

# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/7326?src=pr&el=h1) Report
> Merging [#7326](https://codecov.io/gh/huggingface/transformers/pull/7326?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/d6bc72c469c38a611fb99c3d61807f59b43fe2c9?el=desc) will **decrease** coverage by `0.37%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/7326/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/7326?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #7326      +/-   ##
==========================================
- Coverage   77.40%   77.03%   -0.38%     
==========================================
  Files         181      181              
  Lines       34827    34827              
==========================================
- Hits        26958    26828     -130     
- Misses       7869     7999     +130     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/7326?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/configuration\_reformer.py](https://codecov.io/gh/huggingface/transformers/pull/7326/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3JlZm9ybWVyLnB5) | `21.62% <0.00%> (-78.38%)` | :arrow_down: |
| [src/transformers/modeling\_reformer.py](https://codecov.io/gh/huggingface/transformers/pull/7326/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yZWZvcm1lci5weQ==) | `16.87% <0.00%> (-77.64%)` | :arrow_down: |
| [...c/transformers/modeling\_tf\_transfo\_xl\_utilities.py](https://codecov.io/gh/huggingface/transformers/pull/7326/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl90cmFuc2ZvX3hsX3V0aWxpdGllcy5weQ==) | `10.00% <0.00%> (-76.00%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_transfo\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/7326/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl90cmFuc2ZvX3hsLnB5) | `20.38% <0.00%> (-67.72%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_gpt2.py](https://codecov.io/gh/huggingface/transformers/pull/7326/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9ncHQyLnB5) | `65.38% <0.00%> (-29.59%)` | :arrow_down: |
| [src/transformers/tokenization\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/7326/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fcm9iZXJ0YS5weQ==) | `83.11% <0.00%> (-10.39%)` | :arrow_down: |
| [src/transformers/tokenization\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/7326/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYXV0by5weQ==) | `83.58% <0.00%> (-8.96%)` | :arrow_down: |
| [src/transformers/tokenization\_utils\_base.py](https://codecov.io/gh/huggingface/transformers/pull/7326/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfYmFzZS5weQ==) | `86.60% <0.00%> (-7.31%)` | :arrow_down: |
| [src/transformers/modeling\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/7326/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ194bG0ucHk=) | `88.77% <0.00%> (-2.55%)` | :arrow_down: |
| [src/transformers/tokenization\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/7326/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fb3BlbmFpLnB5) | `82.57% <0.00%> (-1.52%)` | :arrow_down: |
| ... and [18 more](https://codecov.io/gh/huggingface/transformers/pull/7326/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/7326?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/7326?src=pr&el=footer). Last update [d6bc72c...7290951](https://codecov.io/gh/huggingface/transformers/pull/7326?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


@sgugger, please see https://github.com/huggingface/transformers/pull/7334

Implications for this PR: At the moment the check needs to do that only for `@parameterized.*` - it has to be first. All other skip decorators require no special order. 

For  `@parameterized` we have the following possible imported decorators (let's hope they all are consistently imported):
```
@parameterized
@parameterized.expand
@parameterized_class
```
The full doc is here: https://pypi.org/project/parameterized/

There is no problem whatsoever with `@pytest.mark.parametrize` (but it only works with non-unittests) - can use it in any order.

That's an awesome validator! Thanks for adding this to our magic toolkit, @sgugger 

Ok, I changed the script to detect this then.

the swapping of order in the first parts of the PR is not needed, but there is no harm in it either. You can just reset those or not - up to you.

Feeling lazy so since it doesn't matter, let's keep those.

LGTM