Skip to content

Commit 2e1d155

Browse files
author
Michele Simionato
committed
Moved tests outside of src
1 parent eac33cb commit 2e1d155

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

.github/workflows/python-package.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
python -m pip install -e .
3333
- run: codespell --ignore-words-list="assertIn,ba,claus,vas" --quiet-level=2
3434
- run: flake8 . --count --ignore=E122,E226,E265,E741,E742 --max-complexity=22 --max-line-length=124 --show-source --statistics
35-
- run: python src/tests/test.py -v
35+
- run: python tests/test.py -v

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
include README.rst LICENSE.txt CHANGES.md performance.sh documentation.pdf
2-
recursive-include src/tests *.py
2+
include src/decorator.py

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
md: src/tests/documentation.py
2-
python $(S)/ms/tools/py2md.py src/tests/documentation.py docs
1+
md: tests/documentation.py
2+
python $(S)/ms/tools/py2md.py tests/documentation.py docs
33

44
upload: README.rst
5-
rm -rf build/* dist/* && python setup.py sdist bdist_wheel && twine upload dist/*
5+
rm -rf build/* dist/* && python setup.py sdist bdist_wheel && twine upload -r testpypi dist/*

docs/documentation.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
|Author | Michele Simionato|
44
|---|---|
55
|E-mail | michele.simionato@gmail.com|
6-
|Version| 5.1.1 (2022-01-07)|
7-
|Supports| Python 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13|
8-
|Download page| https://pypi.org/project/decorator/5.1.1|
6+
|Version| 5.2.0 (2025-02-22)|
7+
|Supports| Python 3.7, 3.8, 3.9, 3.10, 3.11, 3.12|
8+
|Download page| https://pypi.org/project/decorator/5.2.0|
99
|Installation| ``pip install decorator``|
1010
|License | BSD license|
1111

@@ -1042,7 +1042,7 @@ write code like the following:
10421042
```python
10431043
import time
10441044
import logging
1045-
from asyncio import get_event_loop, sleep, wait
1045+
from asyncio import run, sleep, wait
10461046
from decorator import decorator
10471047

10481048
@decorator
@@ -1061,7 +1061,7 @@ async def make_task(n):
10611061
if __name__ == '__main__':
10621062
logging.basicConfig(level=logging.INFO)
10631063
tasks = [make_task(3), make_task(2), make_task(1)]
1064-
get_event_loop().run_until_complete(wait(tasks))
1064+
run(wait(tasks))
10651065
```
10661066

10671067
and you will get an output like this:
@@ -1090,7 +1090,7 @@ into regular functions, such as the following:
10901090
@decorator
10911091
def coro_to_func(coro, *args, **kw):
10921092
"Convert a coroutine into a function"
1093-
return get_event_loop().run_until_complete(coro(*args, **kw))
1093+
return run(coro(*args, **kw))
10941094
```
10951095

10961096
Notice the difference: the caller in ``log_start_stop`` was a coroutine
@@ -1663,7 +1663,7 @@ penalty in your specific use case is to measure it.
16631663

16641664
## LICENSE (2-clause BSD)
16651665

1666-
Copyright (c) 2005-2020, Michele Simionato
1666+
Copyright (c) 2005-2025, Michele Simionato
16671667
All rights reserved.
16681668

16691669
Redistribution and use in source and binary forms, with or without
@@ -1692,4 +1692,4 @@ DAMAGE.
16921692

16931693
If you use this software and you are happy with it, consider sending me a
16941694
note, just to gratify my ego. On the other hand, if you use this software and
1695-
you are unhappy with it, send me a patch!
1695+
you are unhappy with it, send me a patch!
File renamed without changes.
File renamed without changes.

src/tests/test.py tests/test.py

File renamed without changes.

0 commit comments

Comments
 (0)