# Path: apiritif/thread.py
# def get_index():
#     index = getattr(_thread_local, "index", 0)
#     return index


import os
import unittest
import apiritif
from apiritif.thread import get_index



reader_1 = apiritif.CSVReaderPerThread(os.path.join(os.path.dirname(__file__), "data/source0.csv"))


def log_it(name, target, data):
    log_line = "%s[%s]-%s. %s:%s:%s\n" % (get_index(), target, name, data["name"], data["pass"], data["age"])
    with apiritif.transaction(log_line):    # write log_line into report file for checking purposes
        pass


def setUpModule():    # setup_module

# Path: apiritif/thread.py
# def get_index():
#     index = getattr(_thread_local, "index", 0)
#     return index


# Path: tests/resources/test_thread_reader.py
import os
import unittest
import apiritif
from apiritif.thread import get_index




reader_1 = apiritif.CSVReaderPerThread(os.path.join(os.path.dirname(__file__), "data/source0.csv"))


def log_it(name, target, data):
    log_line = "%s[%s]-%s. %s:%s:%s\n" % (get_index(), target, name, data["name"], data["pass"], data["age"])
    with apiritif.transaction(log_line):    # write log_line into report file for checking purposes
        pass


def setUpModule():    # setup_module

    target = str(get_index())