diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-11-04 22:02:31 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-11-04 22:02:31 (GMT) |
commit | 4bafbf79e8143941d744c9c47e6fc9216fcec47a (patch) | |
tree | e0dc679daaa255d289c84ab0630e42256ab7a58c /tests/format/elf/non_existing_binary.py | |
parent | 72da49fdf05285169a9465b34f7869dafc4715ec (diff) |
Fixed some bugs and defined some first test cases.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@604 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'tests/format/elf/non_existing_binary.py')
-rw-r--r-- | tests/format/elf/non_existing_binary.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/format/elf/non_existing_binary.py b/tests/format/elf/non_existing_binary.py new file mode 100644 index 0000000..47c9028 --- /dev/null +++ b/tests/format/elf/non_existing_binary.py @@ -0,0 +1,26 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + + +# Eprouve quelques mécanismes de construction côté Python. + + +import pychrysalide + +from pychrysalide.analysis.contents import FileContent +from pychrysalide.format.elf import ElfFormat + +cnt = FileContent("non_existing_binary") + +print(cnt) + +print(cnt == None) + +try: + fmt = ElfFormat(cnt) +except TypeError as e: + fmt = None + +print(fmt) + +print(fmt == None) |