Skip to content

Commit

Permalink
Restructure.
Browse files Browse the repository at this point in the history
  • Loading branch information
mihneadb committed May 22, 2016
1 parent 6189d1d commit f9685ec
Show file tree
Hide file tree
Showing 21 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion example.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from trace.record import record
from execution_trace.record import record


@record(3)
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions trace/record.py → execution_trace/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import tempfile
from functools import wraps

from trace.constants import RECORD_FN_NAME, RETVAL_NAME, MANGLED_FN_NAME
from trace.utils import strip_indent
from execution_trace.constants import RECORD_FN_NAME, RETVAL_NAME, MANGLED_FN_NAME
from execution_trace.utils import strip_indent

# Init logging.
logging.basicConfig()
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions tests/test_record.py → execution_trace/tests/test_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
import StringIO
import unittest

from trace import record
from trace.constants import SOURCE_DUMP_SCHEMA, EXECUTION_DUMP_SCHEMA, RECORD_FN_NAME
from execution_trace import record
from execution_trace.constants import SOURCE_DUMP_SCHEMA, EXECUTION_DUMP_SCHEMA, RECORD_FN_NAME


class TestRecord(unittest.TestCase):

# Patch path refers to current module because the decorator injects the
# record fn in here.
record_state_fn_path = '%s.%s' % (__name__, RECORD_FN_NAME)
dump_state_fn_path = 'trace.record.dump_recorded_state'
dump_state_fn_path = 'execution_trace.record.dump_recorded_state'

@classmethod
def setUpClass(cls):
cls.log_patcher = mock.patch('trace.record.logger')
cls.log_patcher = mock.patch('execution_trace.record.logger')
cls.log_patcher.start()

@classmethod
Expand All @@ -27,7 +27,7 @@ def tearDownClass(cls):
def setUp(self):
self._reset_record()

self.get_dump_file_patcher = mock.patch('trace.record._get_dump_file')
self.get_dump_file_patcher = mock.patch('execution_trace.record._get_dump_file')
self.get_dump_file = self.get_dump_file_patcher.start()
self.dump_file = StringIO.StringIO()
self.get_dump_file.return_value = self.dump_file, '/tmp/mock_path'
Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils.py → execution_trace/tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
import mock

from trace.utils import find_indent_level, strip_indent
from execution_trace.utils import find_indent_level, strip_indent


class TestUtils(unittest.TestCase):
Expand All @@ -15,7 +15,7 @@ def test_find_indent_level(self):
source = ''
self.assertEqual(find_indent_level(source), 0)

@mock.patch('trace.utils.find_indent_level')
@mock.patch('execution_trace.utils.find_indent_level')
def test_strip_indent(self, find_indent_mock):
find_indent_mock.return_value = 4

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f9685ec

Please sign in to comment.