mirror of
https://github.com/morluto/rea.git
synced 2026-12-06 14:59:05 +00:00
test(python): share pyc code fixture construction (#15652)
This commit is contained in:
1 parent
2f304e5c29
commit
caf4550b42
5 files changed
+184
-269
No files matched your search
@@ -146,6 +146,13 @@ export const marshalCode = (
|
||||
return concat(...parts);
|
||||
};
|
||||
|
||||
/** A timestamp-header pyc with independently selected magic and code layout. */
|
||||
export const pythonPycWithCode = (
|
||||
magic: number,
|
||||
layout: PythonPycCodeLayout,
|
||||
fields: FixtureCodeFields = {},
|
||||
): Buffer => concat(pythonPycHeader(magic), marshalCode(layout, fields));
|
||||
|
||||
/** Complete pyc with a module code object and optional nested function. */
|
||||
export const pythonPycFixture = (
|
||||
layout: PythonPycCodeLayout = "py311",
|
||||
|
||||
Reference in new issue
Block a user