예제 #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')])
예제 #2
0
    def test_emitting_kwarg_style(self, emit):
        with smokesignal.emitting(enter='foo', exit='bar'):
            pass

        assert emit.call_count == 2
예제 #3
0
 def test_emitting_arg_style(self, emit):
     with smokesignal.emitting('foo'):
         pass
     emit.assert_called_with('foo')
예제 #4
0
    def test_emitting_arg_style(self, emit):
        with smokesignal.emitting('foo'):
            pass

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

        assert emit.call_count == 2
예제 #6
0
    def test_emitting_arg_style(self, emit):
        with smokesignal.emitting('foo'):
            pass

        assert emit.call_count == 1
예제 #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')])
예제 #8
0
 def test_emitting_arg_style(self, emit):
     with smokesignal.emitting('foo'):
         pass
     emit.assert_called_with('foo')