Skip to content

Commit d8336dc

Browse files
committed
update usage.md
1 parent de13b96 commit d8336dc

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test_crossversion/USAGE.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Automated crossversion testing
22
This testing suite is used for automatic testing of differences found between xdis and dis.
3-
This is done by having a way to identically "serialize" important attributes in xdis and dis bytecodes.
4-
We then can check a diff between a serialized xdis and dis bytecode to find if xdis is parsing something incorrectly.
3+
This is done by having a way to identically "serialize" important attributes in bytecodes with xdis and dis.
4+
Using a diff between a bytecode serialized with xdis and dis, we can find if xdis is parsing something incorrectly.
55
Most tests should be ran using the makefile.
66

77
# Parsing results
8-
When running `make test`, tox will serialize bytecode to be put into text form. Given a bytecode compiled in 3.11 and natively disassembled, we go through each of our test versions, say 3.9 ... 3.14, and disassemble the same 3.11 bytecode.
8+
When running `make test`, two main steps take place. 1st, we compile and serialize bytecode in each target version. 2nd, we disasm the same bytecode using xdis, serialize again, and check the diff. In other words, given a bytecode compiled in 3.11 and natively disassembled (dis), we go through each of our test versions, say 3.9 ... 3.14, and disassemble the same 3.11 bytecode.
99
Given the 3.11 serialized disasembly, disassembled from 3.11, we take the diff between that and a serialized 3.11 disassembled from any of our test versions.
1010
This lets us see if there are any differences in how xdis handles native vs cross version.
1111

@@ -22,18 +22,20 @@ for native in test_vers:
2222

2323
Pytest will fail early, so not all tests may be ran.
2424

25-
# System Requirements
25+
# Usage
26+
## Requirements
2627
- `uv`
2728
- uv will handle everything on its own
29+
run `make setup_uv`
2830

2931
---OR---
3032

3133
- `pyenv` and `pyenv-virtualenv`
3234
- Each version needing to be tested should be installed with pyenv
3335
- `tox`
36+
run `make setup_pyenv`
3437

35-
# Usage
36-
## Makefile
38+
## Running tests
3739
Run `make` or `make help` to show the help menu for running and preparing tests, or with `remake`, `remake --tasks`.
3840

3941
To simply run tests, `make test` will copy some sources, prepare template files, and run tests.

0 commit comments

Comments
 (0)