diff options
| author | Armin Rigo <arigo@tunes.org> | 2015-05-12 11:07:25 +0200 |
|---|---|---|
| committer | Armin Rigo <arigo@tunes.org> | 2015-05-12 11:07:25 +0200 |
| commit | fe4bb73d2191ea7b2ee5586848e1c5bbbcbaa72b (patch) | |
| tree | 5c80d5c2ee50bc8e99039c7483522e2febc08cb7 /testing/cffi1/test_cffi_binary.py | |
| parent | 34dbd9932de50a5de29f0fdaab9e9a06526d93a7 (diff) | |
| download | cffi-fe4bb73d2191ea7b2ee5586848e1c5bbbcbaa72b.tar.gz | |
the big Moving Files Around step
Diffstat (limited to 'testing/cffi1/test_cffi_binary.py')
| -rw-r--r-- | testing/cffi1/test_cffi_binary.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/cffi1/test_cffi_binary.py b/testing/cffi1/test_cffi_binary.py new file mode 100644 index 0000000..25953db --- /dev/null +++ b/testing/cffi1/test_cffi_binary.py @@ -0,0 +1,20 @@ +import py, sys, os +import _cffi_backend + +def test_no_unknown_exported_symbols(): + if not hasattr(_cffi_backend, '__file__'): + py.test.skip("_cffi_backend module is built-in") + if not sys.platform.startswith('linux'): + py.test.skip("linux-only") + g = os.popen("objdump -T '%s'" % _cffi_backend.__file__, 'r') + for line in g: + if not line.startswith('0'): + continue + if '*UND*' in line: + continue + name = line.split()[-1] + if name.startswith('_') or name.startswith('.'): + continue + if name not in ('init_cffi_backend', 'PyInit__cffi_backend'): + raise Exception("Unexpected exported name %r" % (name,)) + g.close() |
