semvec/pypi-packages huggingface dataset:
testvars 1.0.0
testvars - Place-holders in complex test assertions
License: MIT
Keywords: test,testing

===================================================
testvars - Place-holders in complex test assertions
===================================================

Sometimes, when writing tests, you want to assert that a data
structure computed in a test matches some expected value, but the
expected value might have components, such as times or generated ids
that can't be predicted ahead of time.  Options in this situation
include:

- break the assertion into many assertions about various parts of the
  data structure.

- Use mocking/stubbing to control things like time and ids to make
  unpredictable parts of the data predictable.

Both of these approaches tend to be pretty tedious and potentially
error prone.

The tiny testvars package provides an alternative that is much easier
to use in many cases.  The package provides a ``Vars`` class::

  >>> import testvars
  >>> vars = testvars.Vars()

When ``Vars`` attributes are compared equal the first time, the
comparison succeeds and alse sets their value:

  >>> vars.x == 1
  True

At that point, the value is set, and you can make assertions
against it:

  >>> vars.x
  1
  >>> vars.x > 0
  True

Further comparisons are against this set value:

  >>> vars.x == 2
  False

This is useful when dealing with data structures with unpredictable
parts:

  >>> expected = {'id': vars.child_id, 'name':"Alex"}
  >>> {'id': 32, 'name':"Alex"} == expected
  True

It's also interesting when, while you don't know what values will be,
you can make assertions about how values are related:

  >>> expected = {'id': vars.parent_id, 'name':'Cas',
  ...             'children': [vars.child_id]}
  >>> expected == {'id': 42, 'name':'Cas', 'children':[32]}
  True
  >>> expected == {'id': 42, 'name':'Cas', 'children':[33]}
  False

  >>> [vars.y, 2, 3, vars.y] == [9, 2, 3, 9]
  True

  >>> [vars.z, 2, 3, vars.z] == [8, 2, 3, 9]
  False

=======
Changes
=======

1.0.0 (2017-07-07)
==================

Initial release
yamlord 0.4
wrapper for yaml package to read/write OrderedDict
License: MIT
Keywords: python-3

yamlord
=======

A wrapper for the `yaml` module to easily read and write `OrderedDict` objects
to and from `YAML` formatted files.

Install
-------

.. code:: bash

    pip install yamlord

Usage
-----

The usage is straightforward: make and `OrderedDict` then write it to a
specified path, or read a `YAML` file from a specified path to an
`OrderedDict`. That's it.

.. code:: python

    from collections import OrderedDict
    import yamlord

    # Make an Ordered dict for testing
    d = OrderedDict()
    d['a'] = 1
    d['b'] = ['str1', 'str2']

    # Write OrderedDict to YAML file
    yamlord.write_yaml(d, './test.yaml')

    # Read YAML file to OrderedDict
    d = yamlord.read_yaml('./test.yaml')
mini-django-accounts 17.7.2
A simple replacement for django.auth.user
License: MIT

# Mini Django Accounts

[![build status](https://gitlab.com/chaosengine256/mini-django-accounts/badges/master/build.svg)](https://gitlab.com/chaosengine256/mini-django-accounts/commits/master)
[![coverage report](https://gitlab.com/chaosengine256/mini-django-accounts/badges/master/coverage.svg)](https://gitlab.com/chaosengine256/mini-django-accounts/commits/master)