GeezerVison is showing github.com — Add a test case for issue #280 · boostorg/python@f7254f5
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: test/fabscript +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -67,6 +67,7 @@ for t in [('injected',), |
67 | 67 | ('args',), |
68 | 68 | ('raw_ctor',), |
69 | 69 | ('exception_translator',), |
| 70 | + ('module_init_exception',), |
70 | 71 | ('test_enum', ['enum_ext']), |
71 | 72 | ('test_cltree', ['cltree']), |
72 | 73 | ('newtest', ['m1', 'm2']), |
|
Collapse file
Copy file name to clipboard +14Lines changed: 14 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Copyright (C) 2003 Rational Discovery LLC |
| 2 | +// Distributed under the Boost Software License, Version 1.0. (See |
| 3 | +// accompanying file LICENSE_1_0.txt or copy at |
| 4 | +// http://www.boost.org/LICENSE_1_0.txt) |
| 5 | + |
| 6 | +#include <boost/python/module.hpp> |
| 7 | +#include <stdexcept> |
| 8 | + |
| 9 | +using namespace boost::python; |
| 10 | + |
| 11 | +BOOST_PYTHON_MODULE(module_init_exception_ext) |
| 12 | +{ |
| 13 | + throw std::runtime_error("Module init failed"); |
| 14 | +} |
Collapse file
Copy file name to clipboard +12Lines changed: 12 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +# Copyright (C) 2003 Rational Discovery LLC. Distributed under the Boost |
| 2 | +# Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy |
| 3 | +# at http://www.boost.org/LICENSE_1_0.txt) |
| 4 | + |
| 5 | +print("running...") |
| 6 | + |
| 7 | +try: |
| 8 | + import module_init_exception_ext |
| 9 | +except RuntimeError as e: |
| 10 | + print(e) |
| 11 | + |
| 12 | +print("Done.") |