Skip to content

Commit

Permalink
Don't compile badsyntax_ files for freeze-stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
coolreader18 committed Oct 18, 2021
1 parent b2c3a62 commit 0093a19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Lib/test/test_utf8source.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_pep3120(self):
)

# TODO: RUSTPYTHON
@unittest.expectedFailure # "badsyntax_pep3120.py" may make the WASM CI fail
@unittest.expectedFailure
def test_badsyntax(self):
try:
import test.badsyntax_pep3120
Expand Down
8 changes: 6 additions & 2 deletions derive/src/compile_bytecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,16 @@ impl CompilationSource {
}
}
Err(e)
})?;
});

if code.is_err() && stem.starts_with("badsyntax_") {
continue;
}

code_map.insert(
module_name,
FrozenModule {
code,
code: code?,
package: is_init,
},
);
Expand Down

0 comments on commit 0093a19

Please sign in to comment.