semvec/pypi-packages huggingface dataset:
dectest 1.1.1
Improved TestCase class
License: MIT
Requires Python: >=3.5

# Improved TestCase Class


[![License](https://img.shields.io/pypi/l/dectest.svg)](https://pypi.python.org/pypi/dectest/)
[![Github](https://img.shields.io/github/release/srittau/python-dectest/all.svg)](https://github.com/srittau/python-dectest/releases/)
[![pypi](https://img.shields.io/pypi/v/dectest.svg)](https://pypi.python.org/pypi/dectest/)
[![Travis CI](https://travis-ci.org/srittau/python-dectest.svg?branch=master)](https://travis-ci.org/srittau/python-dectest)

`dectest.TestCase` is a drop-in replacement for `unittest.TestCase` with
a few added features.

## Tests, Setup, and Teardown with Decorators

Tests can optionally be marked using the `@test` decorator, instead of
prefixing the method name with `test`. The following test case class
contains two tests:

```python
from dectest import TestCase, test

class MyTest(TestCase):
    def test_foo(self):
        pass

    @test
    def bar(self):
        pass
```

Setup and teardown methods can be marked using the `@before` and `@after`
decorators, respectively. A class can have multiple setup and teardown
methods:

```python
from dectest import TestCase, before, after

class MyTest(TestCase):
    @before
    def setup_stuff(self):
        pass

    @before
    def setup_more_stuff(self):
        pass

    @after
    def teardown_all_stuff(self):
        pass
```

While the order of execution inside a class is undefined and should not be
relied upon, it is guaranteed that setup methods in super-classes are
executed before methods in sub-classes, and teardown methods in sub-classes
are executed before teardown method in super-classes:

```python
from dectest import TestCase, before, after

class MySuperTest(TestCase):
    @before
    def super_setup(self):
        print("setup first")

    @after
    def super_teardown(self):
        print("teardown second")

class MySubTest(MySuperTest):
    @before
    def sub_setup(self):
        print("setup second")

    @after
    def sub_teardown(self):
        print("teardown first")
```

## Patch Support

`dectest.TestCase` has a `patch()` method to install a mock using
`unittest.mock.patch()`. This patch is removed during test
teardown:

```python
from dectest import TestCase, test

class MyPatchTest(TestCase):
    @test
    def foo(self):
        exit = self.patch("sys.exit")  # will be stopped during teardown
        # call implementation
        exit.assert_called_with(1)
```
HitBTCMonster 0.0.3
A library for better communication with HitBTC Exchange API
License: MIT
Keywords: HitBTC

HitBTC Library
-------------------

A library for better communication with HitBTC Exchange API
(`HitBTC API Documentation <https://api.hitbtc.com>`_)

Installation:
~~~~~~~~~~~~~~~
.. code:: bash

    pip install HitBTCMonster


Example:
~~~~~~~~~

API
**********

.. code:: python

    from HitBTCMonster.api.core import HitBTC
    from HitBTCMonster.api.market import Market
    from HitBTCMonster.api.trading import Trading

    CORE = HitBTC(
        public='YOUR_PUBLIC_KEY_HERE',
        secret='YOUR_SECRET_KEY_HERE',
    )
    MARKET = Market(CORE)
    TRADING = Trading(CORE)

    # do stuff


WebSocket
****************

.. code:: python

    from HitBTCMonster.wss.core import HitBTC
    from HitBTCMonster.wss.market import Market
    from HitBTCMonster.wss.trading import Trading

    CORE = HitBTC(
        public='YOUR_PUBLIC_KEY_HERE',
        secret='YOUR_SECRET_KEY_HERE',
    )
    MARKET = Market(CORE)
    TRADING = Trading(CORE)

    # do stuff
django-toggle-m2m 0.0.6
Django package for generating methods for toggling ManyToMany relationship entries in models
License: MIT
Requires Python: >=3.6.0


# [django-toggle-m2m](https://pypi.org/project/django-toggle-m2m/)

## Installation

```bash
pip install django_toggle_m2m
```

## Usage in models

```python
from django.db import models

from django_toggle_m2m.toggle import ToggleManyToMany


class Publication(models.Model):
    title = models.CharField(max_length=32)


class Article(models.Model, ToggleManyToMany):
    # ______________________^
    # Extend ToggleManyToMany class
    headline = models.CharField(max_length=256)
    publications = models.ManyToManyField(Publication)

    # Define M2M fields that are toggleable
    TOGGLEABLE_FIELDS = ('publications',)
```

## Relation toggling
```python
article = Article.objects.create(...)
publication = Publication.objects.create(...)

article.toggle_publications(instance=publication) # Will be added
article.toggle_publications(instance=publication) # Will be removed
```

## Development

```bash
git clone https://github.com/wencakisa/django-toggle-m2m.git
pip install django_toggle_m2m
```

---

*Interesting fact* - https://code.djangoproject.com/ticket/20686