Metadata-Version: 1.1
Name: pyariable
Version: 0.3.1
Summary: Placeholder variables to aid in testing.
Home-page: https://github.com/willemt/pyariable
Author: willemt
Author-email: himself@willemthiart.com
License: BSD
Description: pyariable
        #########
        
        Simplify your test assertions forever.
        
        .. code-block:: python
           :class: ignore
        
           from pyariable import Variable
        
           def test_dict():
               x = Variable()
               y = Variable()
               assert {1: "XXX", 2: "XXX", 3: "YYY"} == {1: x, 2: x, 3: y}
               assert x != y
        
        In some tests it's common to get a random ID back from a database. Your assertions are simpler when you substitute a `Variable` object for the expected value.
        
        .. code-block:: python
           :class: ignore
        
           from pyariable import Variable
        
           def test_list():
               x = Variable()
               y = Variable()
               assert [
                   {"db_id": 590, "name": "alice"},
                   {"db_id": 590, "name": "bob"},
                   {"db_id": 999, "name": "charlie"},
               ] == [
                   {"db_id": x, "name": "alice"},
                   {"db_id": x, "name": "bob"},
                   {"db_id": y, "name": "charlie"},
               ]
               assert x != y
               assert x < y
        
        
        Installation
        ------------
        .. code-block:: bash
           :class: ignore
        
           pip install pyariable
        
Keywords: development
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: System :: Logging
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
