Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

expects

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expects - npm Package Compare versions

Comparing version
0.8.0
to
0.9.0
+1
examples/requirements.txt
pytest
# -*- coding: utf-8 -*-
from expects import *
def test_failing():
expect("foo").to(equal("bar"))
+2
-2

@@ -60,5 +60,5 @@ # -*- coding: utf-8 -*-

# The short X.Y version.
version = '0.8'
version = '0.9'
# The full version, including alpha/beta/rc tags.
release = '0.8.0'
release = '0.9.0'

@@ -65,0 +65,0 @@ # The language for content autogenerated by Sphinx. Refer to documentation

Metadata-Version: 1.1
Name: expects
Version: 0.8.0
Version: 0.9.0
Summary: Expressive and extensible TDD/BDD assertion library for Python

@@ -24,6 +24,2 @@ Home-page: https://github.com/jaimegildesagredo/expects

.. image:: https://img.shields.io/pypi/dm/expects.svg
:target: https://pypi.python.org/pypi/expects
:alt: Number of PyPI downloads
.. image:: https://secure.travis-ci.org/jaimegildesagredo/expects.svg?branch=master

@@ -33,2 +29,6 @@ :target: http://travis-ci.org/jaimegildesagredo/expects

.. image:: https://img.shields.io/pypi/pyversions/expects.svg
:target: https://pypi.python.org/pypi/expects
:alt: PyPI versions
**Expects** is an *expressive* and *extensible* TDD/BDD assertion library for Python. Expects can be *extended* by defining `new matchers <http://expects.readthedocs.io/en/latest/custom-matchers.html>`_.

@@ -102,6 +102,9 @@

Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: Apache Software License

@@ -18,2 +18,4 @@ LICENSE

docs/matchers.rst
examples/requirements.txt
examples/test_pytest.py
expects/__init__.py

@@ -20,0 +22,0 @@ expects/_compat.py

@@ -11,2 +11,4 @@ # -*- coding: utf-8 -*

def not_to(self):
__tracebackhide__ = True
self._negated = True

@@ -17,8 +19,14 @@ return self.to

def to_not(self):
__tracebackhide__ = True
return self.not_to
def to(self, matcher):
__tracebackhide__ = True
self._assert(matcher)
def _assert(self, matcher):
__tracebackhide__ = True
ok, reasons = self._match(matcher)

@@ -25,0 +33,0 @@

# -*- coding: utf-8 -*
import functools
import collections
try:
import collections.abc as collections_abc
except ImportError:
import collections as collections_abc
from .. import Matcher, default_matcher

@@ -13,5 +17,5 @@ from ...texts import plain_enumerate

_NON_NORMALIZED_SEQUENCE_TYPES = (
collections.Iterator,
collections.MappingView,
collections.Set
collections_abc.Iterator,
collections_abc.MappingView,
collections_abc.Set
)

@@ -39,3 +43,3 @@

def _is_not_a_sequence(self, value):
return not isinstance(value, collections.Sequence)
return not isinstance(value, collections_abc.Sequence)

@@ -42,0 +46,0 @@ def _matches(self, subject):

# -*- coding: utf-8 -*
import collections
try:
import collections.abc as collections_abc
except ImportError:
import collections as collections_abc

@@ -17,3 +20,3 @@ from .. import Matcher, default_matcher

def _not_a_dict(self, value):
return not isinstance(value, collections.Mapping)
return not isinstance(value, collections_abc.Mapping)

@@ -20,0 +23,0 @@ def _matches(self, subject):

@@ -5,2 +5,7 @@ # -*- coding: utf-8 -*

try:
import collections.abc as collections_abc
except ImportError:
import collections as collections_abc
from .. import Matcher

@@ -22,10 +27,7 @@ from ...texts import plain_enumerate

def _is_unordered_dict(self, subject):
if isinstance(subject, collections.Mapping):
if not hasattr(collections, 'OrderedDict'):
return True
return (
isinstance(subject, collections_abc.Mapping) and
not isinstance(subject, collections.OrderedDict)
)
return not isinstance(subject, collections.OrderedDict)
return False
def _match_negated(self, subject):

@@ -32,0 +34,0 @@ if self._is_unordered_dict(subject):

include *requirements.txt
include README.rst
include LICENSE
recursive-include specs *.py
recursive-include examples *.txt *.py
recursive-include docs *
recursive-include specs *.py
Metadata-Version: 1.1
Name: expects
Version: 0.8.0
Version: 0.9.0
Summary: Expressive and extensible TDD/BDD assertion library for Python

@@ -24,6 +24,2 @@ Home-page: https://github.com/jaimegildesagredo/expects

.. image:: https://img.shields.io/pypi/dm/expects.svg
:target: https://pypi.python.org/pypi/expects
:alt: Number of PyPI downloads
.. image:: https://secure.travis-ci.org/jaimegildesagredo/expects.svg?branch=master

@@ -33,2 +29,6 @@ :target: http://travis-ci.org/jaimegildesagredo/expects

.. image:: https://img.shields.io/pypi/pyversions/expects.svg
:target: https://pypi.python.org/pypi/expects
:alt: PyPI versions
**Expects** is an *expressive* and *extensible* TDD/BDD assertion library for Python. Expects can be *extended* by defining `new matchers <http://expects.readthedocs.io/en/latest/custom-matchers.html>`_.

@@ -102,6 +102,9 @@

Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: Apache Software License

@@ -16,6 +16,2 @@ Expects

.. image:: https://img.shields.io/pypi/dm/expects.svg
:target: https://pypi.python.org/pypi/expects
:alt: Number of PyPI downloads
.. image:: https://secure.travis-ci.org/jaimegildesagredo/expects.svg?branch=master

@@ -25,2 +21,6 @@ :target: http://travis-ci.org/jaimegildesagredo/expects

.. image:: https://img.shields.io/pypi/pyversions/expects.svg
:target: https://pypi.python.org/pypi/expects
:alt: PyPI versions
**Expects** is an *expressive* and *extensible* TDD/BDD assertion library for Python. Expects can be *extended* by defining `new matchers <http://expects.readthedocs.io/en/latest/custom-matchers.html>`_.

@@ -27,0 +27,0 @@

[egg_info]
tag_build =
tag_date = 0
tag_build =
tag_svn_revision = 0

@@ -9,3 +9,3 @@ # -*- coding: utf-8 -*-

name='expects',
version='0.8.0',
version='0.9.0',
description='Expressive and extensible TDD/BDD assertion library for Python',

@@ -17,3 +17,3 @@ long_description=long_description,

license='Apache 2.0',
packages=find_packages(exclude=['specs', 'specs.*']),
packages=find_packages(exclude=['specs', 'specs.*', 'examples', 'examples.*']),
classifiers=[

@@ -26,4 +26,7 @@ 'Development Status :: 5 - Production/Stable',

'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: Implementation',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',

@@ -30,0 +33,0 @@ 'Topic :: Software Development :: Libraries :: Python Modules',

# -*- coding: utf-8 -*
try:
from collections import OrderedDict
except ImportError:
OrderedDict = lambda *args: None
from collections import OrderedDict

@@ -31,5 +28,2 @@ from expects import *

with it('should pass if ordered dict ends with keys'):
if self.ordered_dct is None:
return
expected_args = list(self.ordered_dct)[:2]

@@ -36,0 +30,0 @@

# -*- coding: utf-8 -*
try:
from collections import OrderedDict
except ImportError:
OrderedDict = lambda *args: None
from collections import OrderedDict

@@ -31,5 +28,2 @@ from expects import *

with it('passes if ordered dict starts with keys'):
if self.ordered_dct is None:
return
expected_args = list(self.ordered_dct)[:2]

@@ -36,0 +30,0 @@

@@ -30,3 +30,3 @@ # -*- coding: utf-8 -*-

self.message = "to be 'bar'"
self.pattern = "to be '\w+'"
self.pattern = r"to be '\w+'"

@@ -33,0 +33,0 @@ with it('passes if assertion raised and message ends with'):