# Path: mozz/test.py
# def run_test_module(name, file):
# 	outputfile = mozz.util.python_path_basename(file) + '.out'
# 
# 	m = sys.modules[name]
# 	ldr = unittest.loader.defaultTestLoader
# 	tests = ldr.loadTestsFromModule(m)
# 
# 	with open(outputfile, 'w') as f:
# 		duper = mozz.util.IOWriteDuplicator(
# 			sys.stderr, f
# 		)
# 		unittest.runner.TextTestRunner(
# 			verbosity = 2,
# 			stream = duper
# 		).run(tests)
# 
# def abs_path(base_file, rel_path):
# 	return os.path.join(
# 		os.path.dirname(os.path.abspath(base_file)),
# 		rel_path
# 	)


import unittest
import sys
import mozz
import mozz.sig
from mozz.test import run_test_module, abs_path


class Test(unittest.TestCase):

	def test_basic_step(self):
		s = mozz.Session(abs_path(__file__, "step_basic_test.bin"))

		state = [0]
		d = {
			'got_step':        0,
			'got_at_write':    0,
			'got_after_write': 0,
			'steps_after_write': 0,
			'got_start':       0,
			'got_sig':         0,
			'got_on_exit':     0,
			'got_main_ret':    0
		}


# Path: mozz/test.py
# def run_test_module(name, file):
# 	outputfile = mozz.util.python_path_basename(file) + '.out'
# 
# 	m = sys.modules[name]
# 	ldr = unittest.loader.defaultTestLoader
# 	tests = ldr.loadTestsFromModule(m)
# 
# 	with open(outputfile, 'w') as f:
# 		duper = mozz.util.IOWriteDuplicator(
# 			sys.stderr, f
# 		)
# 		unittest.runner.TextTestRunner(
# 			verbosity = 2,
# 			stream = duper
# 		).run(tests)
# 
# def abs_path(base_file, rel_path):
# 	return os.path.join(
# 		os.path.dirname(os.path.abspath(base_file)),
# 		rel_path
# 	)


# Path: test/step_basic_test.py
import unittest
import sys
import mozz
import mozz.sig
from mozz.test import run_test_module, abs_path



class Test(unittest.TestCase):

	def test_basic_step(self):
		s = mozz.Session(abs_path(__file__, "step_basic_test.bin"))

		state = [0]
		d = {
			'got_step':        0,
			'got_at_write':    0,
			'got_after_write': 0,
			'steps_after_write': 0,
			'got_start':       0,
			'got_sig':         0,
			'got_on_exit':     0,
			'got_main_ret':    0
		}


		@s.on_start()