Skip to content

Commit

Permalink
Moved tests outside of src
Browse files Browse the repository at this point in the history
  • Loading branch information
Michele Simionato committed Feb 22, 2025
1 parent eac33cb commit 2e1d155
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
python -m pip install -e .
- run: codespell --ignore-words-list="assertIn,ba,claus,vas" --quiet-level=2
- run: flake8 . --count --ignore=E122,E226,E265,E741,E742 --max-complexity=22 --max-line-length=124 --show-source --statistics
- run: python src/tests/test.py -v
- run: python tests/test.py -v
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include README.rst LICENSE.txt CHANGES.md performance.sh documentation.pdf
recursive-include src/tests *.py
include src/decorator.py
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
md: src/tests/documentation.py
python $(S)/ms/tools/py2md.py src/tests/documentation.py docs
md: tests/documentation.py
python $(S)/ms/tools/py2md.py tests/documentation.py docs

upload: README.rst
rm -rf build/* dist/* && python setup.py sdist bdist_wheel && twine upload dist/*
rm -rf build/* dist/* && python setup.py sdist bdist_wheel && twine upload -r testpypi dist/*
16 changes: 8 additions & 8 deletions docs/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
|Author | Michele Simionato|
|---|---|
|E-mail | michele.simionato@gmail.com|
|Version| 5.1.1 (2022-01-07)|
|Supports| Python 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13|
|Download page| https://pypi.org/project/decorator/5.1.1|
|Version| 5.2.0 (2025-02-22)|
|Supports| Python 3.7, 3.8, 3.9, 3.10, 3.11, 3.12|
|Download page| https://pypi.org/project/decorator/5.2.0|
|Installation| ``pip install decorator``|
|License | BSD license|

Expand Down Expand Up @@ -1042,7 +1042,7 @@ write code like the following:
```python
import time
import logging
from asyncio import get_event_loop, sleep, wait
from asyncio import run, sleep, wait
from decorator import decorator

@decorator
Expand All @@ -1061,7 +1061,7 @@ async def make_task(n):
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO)
tasks = [make_task(3), make_task(2), make_task(1)]
get_event_loop().run_until_complete(wait(tasks))
run(wait(tasks))
```

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

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

## LICENSE (2-clause BSD)

Copyright (c) 2005-2020, Michele Simionato
Copyright (c) 2005-2025, Michele Simionato
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -1692,4 +1692,4 @@ DAMAGE.

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

0 comments on commit 2e1d155

Please sign in to comment.