from guv.green import threading, time


def f1():
    """A simple function
    """
    print('Hello, world!')


def f2():
    """A simple function that sleeps for a short period of time
    """
    time.sleep(0.1)


class TestThread:
    def test_thread_create(self):
        t = threading.Thread(target=f1)
        assert t

    def test_thread_start(self):
        t = threading.Thread(target=f1)
        t.start()
        assert t

    def test_thread_join(self):
        t = threading.Thread(target=f1)
        t.start()
        t.join()
        assert t

    def test_thread_active(self):
        initial_count = threading.active_count()
        t = threading.Thread(target=f2)
        t.start()
        assert threading.active_count() > initial_count
        t.join()
        assert threading.active_count() == initial_count

@@ -308,33 +308,50 @@
 %0A        assert 
-t
+'green' in repr(t)
 %0A%0A    def test_t
@@ -421,34 +421,51 @@
     
-t.start()%0A        assert t
+assert 'green' in repr(t)%0A        t.start()
 %0A%0A  
@@ -526,32 +526,66 @@
 read(target=f1)%0A
+        assert 'green' in repr(t)%0A
         t.start(
@@ -602,33 +602,16 @@
 t.join()
-%0A        assert t
 %0A%0A    de
@@ -683,24 +683,24 @@
 ive_count()%0A
-
         t = 
@@ -727,16 +727,50 @@
 get=f2)%0A
+        assert 'green' in repr(t)%0A
         

Check to ensure that we're dealing with "green" threads