from __future__ import print_function
import sys
sys.path.append('./')
import time
from spinner.spinner import make_spin, BOX1


class TestClass(object):
    def test_make_spin(self):
        @make_spin(BOX1, "Download youtube video")
        def demo():
            time.sleep(5)

        print("Downloading a youtube video, it would cost much time.")
        demo()

@@ -76,16 +76,30 @@
 rt time%0A
+import pytest%0A
 from spi
@@ -133,16 +133,25 @@
 in, BOX1
+, Spinner
 %0A%0A%0Aclass
@@ -369,16 +369,16 @@
 time.%22)%0A
-
         
@@ -384,8 +384,194 @@
  demo()%0A
+%0A    def test_Spinner(self):%0A        spin = Spinner(BOX1)%0A        assert spin.current() == u'%E2%A0%8B'%0A        assert spin.next() == u'%E2%A0%99'%0A        spin.reset()%0A        assert spin.position == 0%0A

improve spinner pytest