Skip to content

Commit

Permalink
prepping for 0.0.19 (#57)
Browse files Browse the repository at this point in the history
* prepping for 0.0.19
* adding codacy
  • Loading branch information
studioj authored Oct 21, 2019
1 parent dc1dd99 commit c58549f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ python:
- "pypy3"

install:
# Ensure modern pip/etc to avoid some issues w/ older worker environs
- pip install pytest
- pip install coverage
- pip install pytest-cov
- pip install mock
- pip install codecov # For codecov specifically
- pip install codacy-coverage
- pip install .

script:
- cd tests
- pytest --cov=wait_for_it_to
- pytest --cov=wait_for_it_to --cov-report xml:coverage.xml
- cd $TRAVIS_BUILD_DIR


env:
- CODECOV_TOKEN="919258c7-ed4b-463f-973a-68fc7a081d2d"

after_success:
- codecov
- python-codacy-coverage -r coverage.xml

deploy:
provider: pypi
Expand Down
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

##### Code and Test Quality
[![codecov](https://codecov.io/gh/studioj/wait_for_it/branch/master/graph/badge.svg)](https://codecov.io/gh/studioj/wait_for_it)
[![BCH compliance](https://bettercodehub.com/edge/badge/studioj/wait_for_it?branch=master)](https://bettercodehub.com/)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d3292d34dbfd4fae8e2427da3bb77198)](https://www.codacy.com/manual/studioj/wait_for_it?utm_source=github.com&utm_medium=referral&utm_content=studioj/wait_for_it&utm_campaign=Badge_Grade)
[![CodeFactor](https://www.codefactor.io/repository/github/studioj/wait_for_it/badge)](https://www.codefactor.io/repository/github/studioj/wait_for_it)

##### SonarQube
Expand All @@ -22,6 +22,7 @@ This is a library for letting your python code wait for a certain action to comp

short example

Given these functions
```python
import wait_for_it_to
def foo():
Expand All @@ -30,18 +31,33 @@ def foo():
def bar(param):
x = param
return False

```

This would immediatly return
```python
>> wait_for_it_to.be_true(foo)
>>
```

>> wait_for_it_to.be_true(bar, params=[1])
You can also pass parameters as a list
```python
>> wait_for_it_to.be_true(bar, args=[1])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "..\wait_for_it\wait_for_it_to\__init__.py", line 27, in be_true
raise TimeoutError(msg)
TimeoutError: expected something that evaluates to True, but got False instead
```

You can also pass a timeout value in seconds
```python
>> wait_for_it_to.be_true(foo, timeout=5)
```
Quite similar you have the functionality
```python
>> wait_for_it_to.be_false(bar, timeout=5, args[1])
>> wait_for_it_to.equal(bar, False, timeout=5, args[1])
```
#### Version History

https://github.com/studioj/wait_for_it/releases
2 changes: 1 addition & 1 deletion wait_for_it_to/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version_info__ = (0, 0, 18)
__version_info__ = (0, 0, 19)
__version__ = ".".join(map(str, __version_info__))

0 comments on commit c58549f

Please sign in to comment.