def t4(): """ @goal : - @coverage : - """ uedi = test.get_uedi() test.assert_equal(test.get_trace_filename(), None) test.add_trace(["txt"]) filename = test.get_trace_filename() test.assert_true(filename.endswith("%s.pyt" % uedi))
def test_assert_equal(): for val1 in vector: for val2 in vector: test.assert_equal(val1, val2, "equal") if __name__ == "__main__": test.add_trace(["txt"]) test.add_test_case(test_assert) test.add_test_case(test_trace) test.add_test_case(test_assert_equal) test.run_script()
r = r + r for i in r: time.sleep(1) v = random.randint(0, 10) if random.shuffle([True, False]): v = v * (-1) obj = {"time_perf": i + v, "product": "A"} test.trace_json(obj) v = random.randint(0, 10) if random.shuffle([True, False]): v = v * (-1) obj = {"time_perf": (i / 2) + v, "product": "B"} test.trace_json(obj) v = random.randint(0, 10) obj = {"time_perf": (35 + v), "product": "C"} test.trace_json(obj) v = random.randint(0, 80) obj = {"time_perf": v, "product": "D"} test.trace_json(obj) if __name__ == "__main__": test.add_trace(["txt", "logstash", "octopylog"]) test.add_test_case(test_json) test.run_script()
def mock_trace(): test.add_trace(["txt", "logstash", "octopylog"])
# -*- coding: UTF-8 -*- import pytestemb as test import mock def test_exception(): raise Exception("test") if __name__ == "__main__": test.add_trace(["txt", "logstash", "octopylog"]) test.add_test_case(test_exception) test.run_script()