From f5decc90ca1b965fd27c9b94d34da0417876133d Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 24 May 2011 17:52:17 -0500 Subject: [PATCH] test that python loads our fake pycs --- testing/test_assertion.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/testing/test_assertion.py b/testing/test_assertion.py index 9fa88d2e0..567cebbf1 100644 --- a/testing/test_assertion.py +++ b/testing/test_assertion.py @@ -221,3 +221,10 @@ def test_warn_missing(testdir): result.stderr.fnmatch_lines([ "*WARNING*assertion*", ]) + +def test_load_fake_pyc(testdir): + path = testdir.makepyfile("x = 'hello'") + co = compile("x = 'bye'", str(path), "exec") + plugin._write_pyc(co, path) + mod = path.pyimport() + assert mod.x == "bye"