You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor test suite to use unittest and remove pytest configuration (#27)
Summary:
- Removed `conftest.py` file and migrated tests from pytest to unittest framework.
- Updated `tests/test_tritonparse.py` to define test cases using `unittest.TestCase` for better organization.
- Adjusted README documentation to reflect changes in test execution and structure.
- Implemented setup and teardown methods for managing Triton hooks and CUDA device availability.
This refactor enhances the maintainability and clarity of the test suite by standardizing on unittest.
Pull Request resolved: #27
Test Plan:
```
% python -m unittest tests.test_tritonparse -v
test_convert (tests.test_tritonparse.TestTritonparseCPU.test_convert)
Test convert function with various data types ... ok
test_extract_python_source_info (tests.test_tritonparse.TestTritonparseCUDA.test_extract_python_source_info)
Test extract_python_source_info function ... ok
test_whole_workflow (tests.test_tritonparse.TestTritonparseCUDA.test_whole_workflow)
Test unified_parse functionality ... Temporary directory: /tmp/tmp85w50lrw
Found 1 log files in /tmp/tmp85w50lrw/logs: ['dedicated_log_triton_trace_yhao_.ndjson']
tritonparse log file list: /tmp/tmpcudrc3a1/log_file_list.json
INFO:tritonparse:Copying parsed logs from /tmp/tmpcudrc3a1 to /tmp/tmp85w50lrw/parsed_output
ok
----------------------------------------------------------------------
Ran 3 tests in 3.465s
```
Reviewed By: xuzhao9
Differential Revision: D78018758
Pulled By: FindHao
fbshipit-source-id: 5d7677649186899e89b4f782af468d28e1905513
0 commit comments