Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(6)  |  Derive(0)  |  Import(1)

src/d/j/django-postgres-HEAD/tests/test_project/bitstringtest/tests.py   django-postgres(Download)
from django.test import TestCase
from django_postgres import Bits, B
 
import models
 
    def test_or(self):
        self.check_update('00000000',
                          B('bitmap') | Bits('0b10100101'),
                          '10100101')
 
    def test_and(self):
        self.check_update('10100101',
                          B('bitmap') & Bits('0b11000011'),
    def test_xor(self):
        self.check_update('10100101',
                          B('bitmap') ^ Bits('0b11000011'),
                          '01100110')
 
    def test_not(self):
        self.check_update('10100101',
                          ~B('bitmap'),