Exemple #1
0
    def test_eq_when_other_has_same_cb(self):
        s = SyncWrapper('cb')
        other = SyncWrapper('cb')
        another = SyncWrapper('bb')

        assert_equals(s, other)
        assert_not_equals(s, another)
Exemple #2
0
    def test_call(self):
        cb = mock()
        s = SyncWrapper(cb)

        expect(cb).args('foo', 'bar', hello='mars')
        s('foo', 'bar', hello='mars')
        assert_false(s._read)
Exemple #3
0
 def test_eq_when_other_is_same_cb(self):
     s = SyncWrapper('cb')
     assert_equals('cb', s)
     assert_not_equals('bb', s)
Exemple #4
0
 def test_init(self):
     s = SyncWrapper('cb')
     assert_equals('cb', s._cb)
     assert_true(s._read)
     assert_equals(None, s._result)