preggy is a collection of expectations for python applications, extracted from the pyVows project.
heynemann, updated
🕥
2022-01-21 19:16:50
preggy

preggy is an assertion library for Python. What were you expect
ing?
Extracted from the PyVows project.
Installing
We recommend using pip
:
pip install preggy
Usage
Simply tell your test what to expect()
:
```python
from preggy import expect
def test_roses_are_red():
rose = Rose()
expect(rose.color).to_equal('red')
def test_violets_are_not_red():
violet = Violet()
expect(violet.color).not_to_equal('red')
```
Built-in Expectations
Equality
python
expect(4).to_equal(4)
expect(5).Not.to_equal(4)
expect(5).not_to_equal(4) # same as previous
Comparison
```python
expect(4).to_be_lesser_than(5)
expect(5).to_be_greater_than(4)
expect(5).Not.to_be_lesser_than(4)
expect(4).not_to_be_greater(5) # same as previous
expect(4).to_be_lesser_or_equal_to(5)
expect(4).to_be_lesser_or_equal_to(4)
expect(5).not_to_be_lesser_or_equal_to(4)
expect(5).to_be_greater_or_equal_to(4)
expect(5).to_be_greater_or_equal_to(5)
expect(4).not_to_be_greater_or_equal_to(5)
expect("b").to_be_greater_than("a")
expect("a").to_be_lesser_than("b")
expect([1, 2, 3]).to_be_greater_than([1, 2]) # comparing using length
expect((1, 2, 3)).to_be_greater_than((1, 2)) # comparing using length
expect({ "a": "b", "c": "d" }).to_be_greater_than({ "a": "b" }) # comparing using length of keys
```
Similarity
```python
expect('sOmE RandOm CAse StRiNG').to_be_like('some random case string')
expect(1).to_be_like(1)
expect(1).to_be_like(1.0)
expect(1).to_be_like(long(1))
expect([1, 2, 3]).to_be_like([3, 2, 1])
expect([1, 2, 3]).to_be_like((3, 2, 1))
expect([[1, 2], [3,4]]).to_be_like([4, 3], [2, 1]])
expect({ 'some': 1, 'key': 2 }).to_be_like({ 'key': 2, 'some': 1 })
expect('sOmE RandOm CAse StRiNG').Not.to_be_like('other string')
expect('sOmE RandOm CAse StRiNG').not_to_be_like('other string') # same as previous
expect(1).not_to_be_like(2)
expect([[1, 2], [3,4]]).not_to_be_like([4, 4], [2, 1]])
expect({ 'some': 1, 'key': 2 }).not_to_be_like({ 'key': 3, 'some': 4 })
```
Type
```python
expect(os.path).to_be_a_function()
expect(1).to_be_numeric()
expect({ 'some': 1, 'key': 2 }).to_be_instance_of(dict)
expect(open(file)).to_be_a_file()
expect('some').Not.to_be_a_function()
expect('some').Not.to_be_numeric()
expect('some').Not.to_be_instance_of(dict)
expect('some').Not.to_be_a_file()
```
True / False
```python
expect(True).to_be_true()
expect('some').to_be_true()
expect([1, 2, 3]).to_be_true()
expect({ 'a': 'b' }).to_be_true()
expect(1).to_be_true()
expect(False).to_be_false() # not_to_be_true() would work, too. but, it's so...eww
expect(None).to_be_false()
expect('').to_be_false()
expect(0).to_be_false()
expect([]).to_be_false()
expect({}).to_be_false()
```
None
python
expect(None).to_be_null()
expect('some').Not.to_be_null()
expect('some').not_to_be_null() # same as previous
Inclusion
```python
expect([1, 2, 3]).to_include(2)
expect((1, 2, 3)).to_include(2)
expect('123').to_include('2')
expect({ 'a': 1, 'b': 2, 'c': 3}).to_include('b')
expect([1, 3]).Not.to_include(2) # or, exclusion...
```
Regular Expressions
python
expect('some').to_match(r'^[a-z]+')
expect('Some').Not.to_match(r'^[a-z]+')
Length
```python
expect([1, 2, 3]).to_length(3)
expect((1, 2, 3)).to_length(3)
expect('abc').to_length(3)
expect({ 'a': 1, 'b': 2, 'c': 3}).to_length(3)
expect(lifo_queue).to_length(2)
expect(queue).to_length(3)
expect([1]).Not.to_length(3)
expect([1]).not_to_length(3) # same as previous
```
Emptiness
```python
expect([]).to_be_empty()
expect(tuple()).to_be_empty()
expect({}).to_be_empty()
expect('').to_be_empty()
expect([1]).not_to_be_empty()
expect((1,2)).not_to_be_empty()
expect({'a': 1}).not_to_be_empty()
expect('roses are red').not_to_be_empty()
```
Exceptions
```python
expect(RuntimeError()).to_be_an_error()
expect(RuntimeError()).to_be_an_error_like(RuntimeError)
expect(ValueError('error')).to_have_an_error_message_of('error')
expect("I'm not an error").Not.to_be_an_error()
expect(ValueError()).Not.to_be_an_error_like(RuntimeError)
expect(ValueError('some')).Not.to_have_an_error_message_of('error')
when expecting a method to error
err = expect.error_to_happen(RuntimeError) # attribute to a variable so you can use the exception later
with err:
raise RuntimeError("something is wrong")
expect(err).to_have_an_error_message_of('something is wrong')
or the shorter version
with expect.error_to_happen(RuntimeError, message="something is wrong"):
raise RuntimeError("something is wrong")
or if you don't care about the message:
with expect.error_to_happen(RuntimeError):
raise RuntimeError("something is wrong")
or if you need to make sure error does not happen
with expect.error_not_to_happen(RuntimeError, message="something is wrong"):
raise RuntimeError("something is wrong") # Fails with AssertionError
or if you don't care about the message, only that the error does not happen:
with expect.error_not_to_happen(RuntimeError):
raise RuntimeError("something is wrong") # Fails with AssertionError
```
Failure
```python
expect.not_to_be_here() # raises AssertionError
raises AssertionError with error message
expect.not_to_be_here("some error message")
```
Chained Assertions
```python
assertions may be chained, for brevity:
expect(6).not_to_be_null().to_equal(6)
a more sensible example:
expect(foo).not_to_be_null().to_equal(expected.get('foo'))
```
Contributing
See CONTRIBUTING.
License
The MIT License (MIT)
Copyright (c) 2013 Bernardo Heynemann heynemann@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Issues
opened on 2023-01-01 23:44:27 by kloczek
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
- python3 -sBm build -w --no-isolation
- because I'm calling build
with --no-isolation
I'm using during all processes only locally installed modules
- install .whl file in
- run pytest with PYTHONPATH pointing to sitearch and sitelib inside
Here is pytest output:
```console
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-preggy-1.4.4-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-preggy-1.4.4-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/preggy-1.4.4
collected 57 items
tests/test_be_here.py .. [ 3%]
tests/test_chaining.py . [ 5%]
tests/test_comparison.py xxxxxxxx [ 19%]
tests/test_emptiness.py xx [ 22%]
tests/test_equality.py .xx [ 28%]
tests/test_inclusion.py xx [ 31%]
tests/test_length.py xx.. [ 38%]
tests/test_like.py xxx.. [ 47%]
tests/types/test_boolean.py xxxx [ 54%]
tests/types/test_classes.py xx [ 57%]
tests/types/test_errors.py .............. [ 82%]
tests/types/test_file.py xx. [ 87%]
tests/types/test_function.py x. [ 91%]
tests/types/test_nullable.py .. [ 94%]
tests/types/test_numeric.py x [ 96%]
tests/types/test_regexp.py .. [100%]
===================================================================================== warnings summary ======================================================================================
preggy/utils.py:28
/home/tkloczko/rpmbuild/BUILD/preggy-1.4.4/preggy/utils.py:28: UserWarning: Ignoring unidecode. Probably setup.py installing package.
warnings.warn('Ignoring unidecode. Probably setup.py installing package.')
tests/test_comparison.py:155
tests/test_comparison.py:155: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_greater_than will be ignored
def test_greater_than():
tests/test_comparison.py:161
tests/test_comparison.py:161: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_not_greater_than will be ignored
def test_not_greater_than():
tests/test_comparison.py:167
tests/test_comparison.py:167: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_lesser_than will be ignored
def test_lesser_than():
tests/test_comparison.py:173
tests/test_comparison.py:173: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_not_lesser_than will be ignored
def test_not_lesser_than():
tests/test_comparison.py:179
tests/test_comparison.py:179: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_greater_or_equal_to will be ignored
def test_greater_or_equal_to():
tests/test_comparison.py:189
tests/test_comparison.py:189: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_not_greater_or_equal_to will be ignored
def test_not_greater_or_equal_to():
tests/test_comparison.py:199
tests/test_comparison.py:199: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_lesser_or_equal_to will be ignored
def test_lesser_or_equal_to():
tests/test_comparison.py:209
tests/test_comparison.py:209: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_not_lesser_or_equal_to will be ignored
def test_not_lesser_or_equal_to():
tests/test_emptiness.py:40
tests/test_emptiness.py:40: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_emptiness_assertion_works will be ignored
def test_emptiness_assertion_works():
tests/test_emptiness.py:45
tests/test_emptiness.py:45: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_not_emptiness_assertion_works will be ignored
def test_not_emptiness_assertion_works():
tests/test_equality.py:61
tests/test_equality.py:61: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_equal will be ignored
def test_equal():
tests/test_equality.py:66
tests/test_equality.py:66: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_not_equal will be ignored
def test_not_equal():
tests/test_inclusion.py:60
tests/test_inclusion.py:60: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_includes will be ignored
def test_includes():
tests/test_inclusion.py:65
tests/test_inclusion.py:65: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_not_includes will be ignored
def test_not_includes():
tests/test_length.py:72
tests/test_length.py:72: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_length will be ignored
def test_length():
tests/test_length.py:77
tests/test_length.py:77: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_not_includes will be ignored
def test_not_includes():
tests/test_like.py:176
tests/test_like.py:176: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_likeness will be ignored
def test_likeness():
tests/test_like.py:210
tests/test_like.py:210: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_likeness_fails will be ignored
def test_likeness_fails():
tests/test_like.py:244
tests/test_like.py:244: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_not_likeness will be ignored
def test_not_likeness():
tests/types/test_boolean.py:75
tests/types/test_boolean.py:75: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_to_be_true will be ignored
def test_to_be_true():
tests/types/test_boolean.py:80
tests/types/test_boolean.py:80: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_not_to_be_true will be ignored
def test_not_to_be_true():
tests/types/test_boolean.py:85
tests/types/test_boolean.py:85: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_to_be_false will be ignored
def test_to_be_false():
tests/types/test_boolean.py:90
tests/types/test_boolean.py:90: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_not_to_be_false will be ignored
def test_not_to_be_false():
tests/types/test_classes.py:52
tests/types/test_classes.py:52: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_to_be_instance_of will be ignored
def test_to_be_instance_of():
tests/types/test_classes.py:57
tests/types/test_classes.py:57: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_not_to_be_instance_of will be ignored
def test_not_to_be_instance_of():
tests/types/test_file.py:50
tests/types/test_file.py:50: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_to_be_a_file will be ignored
def test_to_be_a_file():
tests/types/test_file.py:55
tests/types/test_file.py:55: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_not_to_be_a_file will be ignored
def test_not_to_be_a_file():
tests/types/test_function.py:49
tests/types/test_function.py:49: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_to_be_a_function will be ignored
def test_to_be_a_function():
tests/types/test_numeric.py:28
tests/types/test_numeric.py:28: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_to_be_numeric will be ignored
def test_to_be_numeric():
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
XFAIL tests/test_comparison.py::test_greater_than - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_greater_than will be ignored
XFAIL tests/test_comparison.py::test_not_greater_than - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_not_greater_than will be ignored
XFAIL tests/test_comparison.py::test_lesser_than - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_lesser_than will be ignored
XFAIL tests/test_comparison.py::test_not_lesser_than - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_not_lesser_than will be ignored
XFAIL tests/test_comparison.py::test_greater_or_equal_to - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_greater_or_equal_to will be ignored
XFAIL tests/test_comparison.py::test_not_greater_or_equal_to - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_not_greater_or_equal_to will be ignored
XFAIL tests/test_comparison.py::test_lesser_or_equal_to - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_lesser_or_equal_to will be ignored
XFAIL tests/test_comparison.py::test_not_lesser_or_equal_to - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_not_lesser_or_equal_to will be ignored
XFAIL tests/test_emptiness.py::test_emptiness_assertion_works - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_emptiness_assertion_works will be ignored
XFAIL tests/test_emptiness.py::test_not_emptiness_assertion_works - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_not_emptiness_assertion_works will be ignored
XFAIL tests/test_equality.py::test_equal - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_equal will be ignored
XFAIL tests/test_equality.py::test_not_equal - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_not_equal will be ignored
XFAIL tests/test_inclusion.py::test_includes - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_includes will be ignored
XFAIL tests/test_inclusion.py::test_not_includes - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_not_includes will be ignored
XFAIL tests/test_length.py::test_length - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_length will be ignored
XFAIL tests/test_length.py::test_not_includes - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_not_includes will be ignored
XFAIL tests/test_like.py::test_likeness - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_likeness will be ignored
XFAIL tests/test_like.py::test_likeness_fails - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_likeness_fails will be ignored
XFAIL tests/test_like.py::test_not_likeness - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_not_likeness will be ignored
XFAIL tests/types/test_boolean.py::test_to_be_true - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_to_be_true will be ignored
XFAIL tests/types/test_boolean.py::test_not_to_be_true - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_not_to_be_true will be ignored
XFAIL tests/types/test_boolean.py::test_to_be_false - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_to_be_false will be ignored
XFAIL tests/types/test_boolean.py::test_not_to_be_false - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_not_to_be_false will be ignored
XFAIL tests/types/test_classes.py::test_to_be_instance_of - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_to_be_instance_of will be ignored
XFAIL tests/types/test_classes.py::test_not_to_be_instance_of - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_not_to_be_instance_of will be ignored
XFAIL tests/types/test_file.py::test_to_be_a_file - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_to_be_a_file will be ignored
XFAIL tests/types/test_file.py::test_not_to_be_a_file - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_not_to_be_a_file will be ignored
XFAIL tests/types/test_function.py::test_to_be_a_function - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_to_be_a_function will be ignored
XFAIL tests/types/test_numeric.py::test_to_be_numeric - reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_to_be_numeric will be ignored
======================================================================== 28 passed, 29 xfailed, 30 warnings in 0.88s ========================================================================
```
Here is list of installed modules in build env
```console
Package Version
----------------- --------------
asn1crypto 1.5.1
attrs 22.2.0
bcrypt 3.2.2
build 0.9.0
cffi 1.15.1
contourpy 1.0.6
cryptography 38.0.4
cycler 0.11.0
distro 1.8.0
exceptiongroup 1.0.0
extras 1.0.0
fixtures 4.0.0
fonttools 4.38.0
gpg 1.18.0-unknown
iniconfig 1.1.1
kiwisolver 1.4.4
libcomps 0.1.19
lit 15.0.6
matplotlib 3.6.2
meson 1.0.0
numpy 1.24.1
olefile 0.46
packaging 21.3
pbr 5.9.0
pep517 0.13.0
Pillow 9.3.0
pip 22.3.1
pluggy 1.0.0
ply 3.11
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.21
PyGObject 3.42.2
pyparsing 3.0.9
pytest 7.2.0
python-dateutil 2.8.2
PyYAML 6.0
rpm 4.17.0
setuptools 65.6.3
six 1.16.0
testtools 2.5.0
tomli 2.0.1
tpm2-pkcs11-tools 1.33.7
tpm2-pytss 1.1.0
wheel 0.38.4
```
opened on 2022-01-21 19:16:49 by dependabot[bot]
Bumps ipython from 0.13.2 to 7.16.3.
Release notes
Sourced from ipython's releases.
7.9.0
No release notes provided.
7.8.0
No release notes provided.
7.7.0
No release notes provided.
7.6.1
No release notes provided.
7.6.0
No release notes provided.
7.5.0
No release notes provided.
7.4.0
No release notes provided.
7.3.0
No release notes provided.
7.2.0
No release notes provided.
7.1.1
No release notes provided.
7.1.0
No release notes provided.
7.0.1
No release notes provided.
7.0.0
No release notes provided.
7.0.0-doc
No release notes provided.
7.0.0rc1
No release notes provided.
7.0.0b1
No release notes provided.
6.2.1
No release notes provided.
... (truncated)
Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/heynemann/preggy/network/alerts).
opened on 2021-04-20 17:08:43 by dependabot[bot]
Bumps py from 1.4.13 to 1.10.0.
Changelog
Sourced from py's changelog.
1.10.0 (2020-12-12)
- Fix a regular expression DoS vulnerability in the py.path.svnwc SVN blame functionality (CVE-2020-29651)
- Update vendored apipkg: 1.4 => 1.5
- Update vendored iniconfig: 1.0.0 => 1.1.1
1.9.0 (2020-06-24)
-
Add type annotation stubs for the following modules:
py.error
py.iniconfig
py.path
(not including SVN paths)
py.io
py.xml
There are no plans to type other modules at this time.
The type annotations are provided in external .pyi files, not inline in the
code, and may therefore contain small errors or omissions. If you use py
in conjunction with a type checker, and encounter any type errors you believe
should be accepted, please report it in an issue.
1.8.2 (2020-06-15)
- On Windows,
py.path.local
s which differ only in case now have the same
Python hash value. Previously, such paths were considered equal but had
different hashes, which is not allowed and breaks the assumptions made by
dicts, sets and other users of hashes.
1.8.1 (2019-12-27)
1.8.0 (2019-02-21)
-
add "importlib"
pyimport mode for python3.5+, allowing unimportable test suites
to contain identically named modules.
-
fix LocalPath.as_cwd()
not calling os.chdir()
with None
, when
being invoked from a non-existing directory.
... (truncated)
Commits
e5ff378
Update CHANGELOG for 1.10.0
94cf44f
Update vendored libs
5e8ded5
testing: comment out an assert which fails on Python 3.9 for now
afdffcc
Rename HOWTORELEASE.rst to RELEASING.rst
2de53a6
Merge pull request #266 from nicoddemus/gh-actions
fa1b32e
Merge pull request #264 from hugovk/patch-2
887d6b8
Skip test_samefile_symlink on pypy3 on Windows
e94e670
Fix test_comments() in test_source
fef9a32
Adapt test
4a694b0
Add GitHub Actions badge to README
- Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/heynemann/preggy/network/alerts).
opened on 2020-03-18 14:30:02 by jayvdb
Fixes https://github.com/heynemann/preggy/issues/32
opened on 2019-02-20 14:52:17 by jayvdb
Please add a LICENSE file to the repo, and include it in the sdists uploaded to PyPI.
opened on 2018-03-05 19:12:09 by movermeyer
Hello, this is an auto-generated Pull Request. (Feedback?)
Some time ago, pypip.in shut down. This broke the badges for a bunch of repositories, including preggy
. Thankfully, an equivalent service is run by shields.io. This pull request changes the badges to use shields.io instead.
Unfortunately, PyPI has removed download statistics from their API, which means that even the shields.io "download count" badges are broken (they display "no longer available". See this). So those badges should really be removed entirely. Since this is an automated process (and trying to automatically remove the badges from READMEs can be tricky), this pull request just replaces the URL with the shields.io syntax.
Releases
2014-01-05 21:11:11
New
- Added
preggy.__main__
(#9)
- You can now use
python -m preggy
to print a quick reference of preggy's assertions
Documentation
- Added package docstring (hooray!)
- The
not_*
form of assertions generated by @create_assertions
no longer adds a (useless) docstring
- Fixed typo for docstring of
not_to_be_like()
- README: Extracted "DEVELOPING.md" to its own file
Other minor changes
- Added
preggy.__meta__
; it contains all non-install related metadata
2014-01-02 17:42:44
Release 0.8.1
General
- The decorators
@assertion
and @create_assertions
now use functools
(#5)
@create_assertions
now reuses code from @assertion
- Factored string formatting to
utils.py
(#10)
- Added (minimal, debug) logging (#8)
- This also involved refactoring
_registered_assertions
to use a slightly-modified dict
class, found in utils.py
preggy.__init__.py
(correctly) no longer imports fix_string
Other minor changes
- Fix minor docstring typo in
assertions/comparison.py
- Added 2 missing docstrings in
assertions.types.boolean
- Many small edits to
README.md
for formatting and clarity