Ejemplo n.º 1
0
 def test_emitting_kwarg_style(self, emit):
     with smokesignal.emitting(enter='foo', exit='bar'):
         pass
     emit.assert_has_calls([call('foo'), call('bar')])
Ejemplo n.º 2
0
    def test_emitting_kwarg_style(self, emit):
        with smokesignal.emitting(enter='foo', exit='bar'):
            pass

        assert emit.call_count == 2
Ejemplo n.º 3
0
 def test_emitting_arg_style(self, emit):
     with smokesignal.emitting('foo'):
         pass
     emit.assert_called_with('foo')
Ejemplo n.º 4
0
    def test_emitting_arg_style(self, emit):
        with smokesignal.emitting('foo'):
            pass

        assert emit.call_count == 1
Ejemplo n.º 5
0
    def test_emitting_kwarg_style(self, emit):
        with smokesignal.emitting(enter='foo', exit='bar'):
            pass

        assert emit.call_count == 2
Ejemplo n.º 6
0
    def test_emitting_arg_style(self, emit):
        with smokesignal.emitting('foo'):
            pass

        assert emit.call_count == 1
Ejemplo n.º 7
0
 def test_emitting_kwarg_style(self, emit):
     with smokesignal.emitting(enter='foo', exit='bar'):
         pass
     emit.assert_has_calls([call('foo'), call('bar')])
Ejemplo n.º 8
0
 def test_emitting_arg_style(self, emit):
     with smokesignal.emitting('foo'):
         pass
     emit.assert_called_with('foo')