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
Copy file name to clipboardExpand all lines: test_crossversion/USAGE.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
# Automated crossversion testing
2
2
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.
5
5
Most tests should be ran using the makefile.
6
6
7
7
# 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.
9
9
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.
10
10
This lets us see if there are any differences in how xdis handles native vs cross version.
11
11
@@ -22,18 +22,20 @@ for native in test_vers:
22
22
23
23
Pytest will fail early, so not all tests may be ran.
24
24
25
-
# System Requirements
25
+
# Usage
26
+
## Requirements
26
27
-`uv`
27
28
- uv will handle everything on its own
29
+
run `make setup_uv`
28
30
29
31
---OR---
30
32
31
33
-`pyenv` and `pyenv-virtualenv`
32
34
- Each version needing to be tested should be installed with pyenv
33
35
-`tox`
36
+
run `make setup_pyenv`
34
37
35
-
# Usage
36
-
## Makefile
38
+
## Running tests
37
39
Run `make` or `make help` to show the help menu for running and preparing tests, or with `remake`, `remake --tasks`.
38
40
39
41
To simply run tests, `make test` will copy some sources, prepare template files, and run tests.
0 commit comments