forked from stackimpact/stackimpact-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathframe_cache_test.py
More file actions
30 lines (21 loc) · 743 Bytes
/
Copy pathframe_cache_test.py
File metadata and controls
30 lines (21 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import unittest
import sys
import threading
import os
import stackimpact
class FrameCacheTestCase(unittest.TestCase):
def test_skip_stack(self):
stackimpact._agent = None
agent = stackimpact.start(
dashboard_address = 'http://localhost:5001',
agent_key = 'key1',
app_name = 'TestPythonApp',
debug = True
)
test_agent_file = os.path.realpath(stackimpact.__file__)
self.assertTrue(agent.frame_cache.is_agent_frame(test_agent_file))
test_system_file = os.path.realpath(threading.__file__)
self.assertTrue(agent.frame_cache.is_system_frame(test_system_file))
agent.destroy()
if __name__ == '__main__':
unittest.main()