keyword
stringclasses
7 values
repo_name
stringlengths
8
98
file_path
stringlengths
4
244
file_extension
stringclasses
29 values
file_size
int64
0
84.1M
line_count
int64
0
1.6M
content
stringlengths
1
84.1M
language
stringclasses
14 values
3D
mcellteam/mcell
libs/pybind11/tests/env.py
.py
1,022
34
# -*- coding: utf-8 -*- import platform import sys import pytest LINUX = sys.platform.startswith("linux") MACOS = sys.platform.startswith("darwin") WIN = sys.platform.startswith("win32") or sys.platform.startswith("cygwin") CPYTHON = platform.python_implementation() == "CPython" PYPY = platform.python_implementation...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_const_name.cpp
.cpp
4,254
71
// Copyright (c) 2021 The Pybind Development Team. // All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #include "pybind11_tests.h" #if defined(_MSC_VER) && _MSC_VER < 1910 // MSVC 2015 fails in bizarre ways. # define PYBIND11_SKIP_TEST_CONST...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_const_name.py
.py
650
32
# -*- coding: utf-8 -*- import pytest import env from pybind11_tests import const_name as m @pytest.mark.parametrize("func", (m.const_name_tests, m.underscore_tests)) @pytest.mark.parametrize( "selector, expected", enumerate( ( "", "A", "Bd", "Cef", ...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_factory_constructors.py
.py
16,731
521
# -*- coding: utf-8 -*- import re import pytest import env # noqa: F401 from pybind11_tests import ConstructorStats from pybind11_tests import factory_constructors as m from pybind11_tests.factory_constructors import tag def test_init_factory_basic(): """Tests py::init_factory() wrapper around various ways of ...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_thread.py
.py
875
45
# -*- coding: utf-8 -*- import threading from pybind11_tests import thread as m class Thread(threading.Thread): def __init__(self, fn): super(Thread, self).__init__() self.fn = fn self.e = None def run(self): try: for i in range(10): self.fn(i, i)...
Python
3D
mcellteam/mcell
libs/pybind11/tests/cross_module_gil_utils.cpp
.cpp
1,781
65
/* tests/cross_module_gil_utils.cpp -- tools for acquiring GIL from a different module Copyright (c) 2019 Google LLC All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/pybind11.h> #include <cstdint> // This fil...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_exceptions.cpp
.cpp
10,197
306
/* tests/test_custom-exceptions.cpp -- exception translation Copyright (c) 2016 Pim Schellart <P.Schellart@princeton.edu> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "test_exceptions.h" #include "local_bindings.h" ...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_eval_call.py
.py
143
6
# -*- coding: utf-8 -*- # This file is called from 'test_eval.py' if "call_test2" in locals(): call_test2(y) # noqa: F821 undefined name
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_iostream.py
.py
7,958
332
# -*- coding: utf-8 -*- import sys from contextlib import contextmanager from pybind11_tests import iostream as m try: # Python 3 from io import StringIO except ImportError: # Python 2 try: from cStringIO import StringIO except ImportError: from StringIO import StringIO try: #...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_builtin_casters.cpp
.cpp
15,872
386
/* tests/test_builtin_casters.cpp -- Casters available without any additional headers Copyright (c) 2017 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/complex.h> #includ...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_enum.cpp
.cpp
5,722
134
/* tests/test_enums.cpp -- enumerations Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "pybind11_tests.h" TEST_SUBMODULE(enums, m) { // test_unscoped_enum ...
C++
3D
mcellteam/mcell
libs/pybind11/tests/pybind11_tests.h
.h
3,018
92
#pragma once #include <pybind11/eval.h> #include <pybind11/pybind11.h> #if defined(_MSC_VER) && _MSC_VER < 1910 // We get some really long type names here which causes MSVC 2015 to emit warnings # pragma warning( \ disable : 4503)...
Unknown
3D
mcellteam/mcell
libs/pybind11/tests/test_multiple_inheritance.py
.py
12,034
497
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import ConstructorStats from pybind11_tests import multiple_inheritance as m def test_multiple_inheritance_cpp(): mt = m.MIType(3, 4) assert mt.foo() == 3 assert mt.bar() == 4 @pytest.mark.skipif("env.PYPY and env.PY2")...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_stl.cpp
.cpp
20,722
529
/* tests/test_stl.cpp -- STL type casters Copyright (c) 2017 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/stl.h> #include "constructor_stats.h" #include "pybind11_tests...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_numpy_vectorize.py
.py
9,710
268
# -*- coding: utf-8 -*- import pytest from pybind11_tests import numpy_vectorize as m np = pytest.importorskip("numpy") def test_vectorize(capture): assert np.isclose(m.vectorized_func3(np.array(3 + 7j)), [6 + 14j]) for f in [m.vectorized_func, m.vectorized_func2]: with capture: assert ...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_iostream.cpp
.cpp
4,122
131
/* tests/test_iostream.cpp -- Usage of scoped_output_redirect Copyright (c) 2017 Henry F. Schreiner All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #if defined(_MSC_VER) && _MSC_VER < 1910 // VS 2015's MSVC # pragma warning(...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_numpy_array.py
.py
20,339
594
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import numpy_array as m np = pytest.importorskip("numpy") def test_dtypes(): # See issue #1328. # - Platform-dependent sizes. for size_check in m.get_platform_dtype_size_checks(): print(size_check) assert ...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_union.py
.py
172
10
# -*- coding: utf-8 -*- from pybind11_tests import union_ as m def test_union(): instance = m.TestUnion() instance.as_uint = 10 assert instance.as_int == 10
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_buffers.cpp
.cpp
8,567
225
/* tests/test_buffers.cpp -- supporting Pythons' buffer protocol Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/stl.h> #include "constructor_stats.h" #...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_constants_and_functions.cpp
.cpp
5,934
163
/* tests/test_constants_and_functions.cpp -- global constants and functions, enumerations, raw byte strings Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "py...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_eval.cpp
.cpp
3,168
119
/* tests/test_eval.cpp -- Usage of eval() and eval_file() Copyright (c) 2016 Klemens D. Morgenstern All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/eval.h> #include "pybind11_tests.h" #include <utility> TE...
C++
3D
mcellteam/mcell
libs/pybind11/tests/pybind11_cross_module_tests.cpp
.cpp
6,264
150
/* tests/pybind11_cross_module_tests.cpp -- contains tests that require multiple modules Copyright (c) 2017 Jason Rhinelander <jason@imaginary.ca> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/stl_bind.h> ...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_call_policies.py
.py
6,573
249
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import ConstructorStats from pybind11_tests import call_policies as m @pytest.mark.xfail("env.PYPY", reason="sometimes comes out 1 off on PyPy", strict=False) def test_keep_alive_argument(capture): n_inst = ConstructorStats.detail...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_opaque_types.py
.py
1,907
60
# -*- coding: utf-8 -*- import pytest from pybind11_tests import ConstructorStats, UserType from pybind11_tests import opaque_types as m def test_string_list(): lst = m.StringList() lst.push_back("Element 1") lst.push_back("Element 2") assert m.print_opaque_list(lst) == "Opaque list: [Element 1, Elem...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_constants_and_functions.py
.py
1,522
54
# -*- coding: utf-8 -*- import pytest m = pytest.importorskip("pybind11_tests.constants_and_functions") def test_constants(): assert m.some_constant == 14 def test_function_overloading(): assert m.test_function() == "test_function()" assert m.test_function(7) == "test_function(7)" assert m.test_fun...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_custom_type_setup.cpp
.cpp
1,259
42
/* tests/test_custom_type_setup.cpp -- Tests `pybind11::custom_type_setup` Copyright (c) Google LLC All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/pybind11.h> #include "pybind11_tests.h" namespace py = pyb...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_builtin_casters.py
.py
18,372
551
# -*- coding: utf-8 -*- import pytest import env from pybind11_tests import IncType, UserType from pybind11_tests import builtin_casters as m def test_simple_string(): assert m.string_roundtrip("const char *") == "const char *" def test_unicode_conversion(): """Tests unicode conversion and error reporting....
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_callbacks.cpp
.cpp
9,243
244
/* tests/test_callbacks.cpp -- callbacks Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/functional.h> #include "constructor_stats.h" #include "pybind11...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_docstring_options.py
.py
1,630
43
# -*- coding: utf-8 -*- from pybind11_tests import docstring_options as m def test_docstring_options(): # options.disable_function_signatures() assert not m.test_function1.__doc__ assert m.test_function2.__doc__ == "A custom docstring" # docstring specified on just the first overload definition: ...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_pickling.py
.py
2,286
83
# -*- coding: utf-8 -*- import pytest import env from pybind11_tests import pickling as m try: import cPickle as pickle # Use cPickle on Python 2.7 except ImportError: import pickle @pytest.mark.parametrize("cls_name", ["Pickleable", "PickleableNew"]) def test_roundtrip(cls_name): cls = getattr(m, cls_...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_methods_and_attributes.cpp
.cpp
21,327
460
/* tests/test_methods_and_attributes.cpp -- constructors, deconstructors, attribute access, __str__, argument and return value conventions Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_numpy_array.cpp
.cpp
19,774
525
/* tests/test_numpy_array.cpp -- test core array functionality Copyright (c) 2016 Ivan Smirnov <i.s.smirnov@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/numpy.h> #include <pybind11/stl.h> #incl...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_docstring_options.cpp
.cpp
2,816
89
/* tests/test_docstring_options.cpp -- generation of docstrings and signatures Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "pybind11_tests.h" TEST_SUBMODULE(d...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_eval.py
.py
1,183
52
# -*- coding: utf-8 -*- import os import pytest import env # noqa: F401 from pybind11_tests import eval_ as m def test_evals(capture): with capture: assert m.test_eval_statements() assert capture == "Hello World!" assert m.test_eval() assert m.test_eval_single_statement() assert m.tes...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_modules.py
.py
2,843
93
# -*- coding: utf-8 -*- from pybind11_tests import ConstructorStats from pybind11_tests import modules as m from pybind11_tests.modules import subsubmodule as ms def test_nested_modules(): import pybind11_tests assert pybind11_tests.__name__ == "pybind11_tests" assert pybind11_tests.modules.__name__ == "...
Python
3D
mcellteam/mcell
libs/pybind11/tests/local_bindings.h
.h
2,847
93
#pragma once #include "pybind11_tests.h" #include <utility> /// Simple class used to test py::local: template <int> class LocalBase { public: explicit LocalBase(int i) : i(i) {} int i = -1; }; /// Registered with py::module_local in both main and secondary modules: using LocalType = LocalBase<0>; /// Registe...
Unknown
3D
mcellteam/mcell
libs/pybind11/tests/test_sequences_and_iterators.py
.py
8,059
254
# -*- coding: utf-8 -*- import pytest from pybind11_tests import ConstructorStats from pybind11_tests import sequences_and_iterators as m def isclose(a, b, rel_tol=1e-05, abs_tol=0.0): """Like math.isclose() from Python 3.5""" return abs(a - b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol) def allclose(a_...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_local_bindings.py
.py
8,101
258
# -*- coding: utf-8 -*- import pytest import env # noqa: F401 from pybind11_tests import local_bindings as m def test_load_external(): """Load a `py::module_local` type that's only registered in an external module""" import pybind11_cross_module_tests as cm assert m.load_external1(cm.ExternalType1(11))...
Python
3D
mcellteam/mcell
libs/pybind11/tests/object.h
.h
5,743
206
#if !defined(__OBJECT_H) # define __OBJECT_H # include "constructor_stats.h" # include <atomic> /// Reference counted object base class class Object { public: /// Default constructor Object() { print_default_created(this); } /// Copy constructor Object(const Object &) : m_refCount(0) { prin...
Unknown
3D
mcellteam/mcell
libs/pybind11/tests/test_custom_type_casters.cpp
.cpp
7,210
210
/* tests/test_custom_type_casters.cpp -- tests type_caster<T> Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "constructor_stats.h" #include "pybind11_tests.h" //...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_numpy_dtypes.py
.py
14,036
442
# -*- coding: utf-8 -*- import re import pytest import env # noqa: F401 from pybind11_tests import numpy_dtypes as m np = pytest.importorskip("numpy") @pytest.fixture(scope="module") def simple_dtype(): ld = np.dtype("longdouble") return np.dtype( { "names": ["bool_", "uint_", "float_"...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_custom_type_casters.py
.py
4,088
122
# -*- coding: utf-8 -*- import pytest from pybind11_tests import custom_type_casters as m def test_noconvert_args(msg): a = m.ArgInspector() assert ( msg(a.f("hi")) == """ loading ArgInspector1 argument WITH conversion allowed. Argument value = hi """ ) assert ( m...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_kwargs_and_defaults.cpp
.cpp
9,236
274
/* tests/test_kwargs_and_defaults.cpp -- keyword arguments and default values Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/stl.h> #include "construct...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_stl_binders.py
.py
8,071
319
# -*- coding: utf-8 -*- import pytest import env from pybind11_tests import stl_binders as m def test_vector_int(): v_int = m.VectorInt([0, 0]) assert len(v_int) == 2 assert bool(v_int) is True # test construction from a generator v_int1 = m.VectorInt(x for x in range(5)) assert v_int1 == m....
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_pickling.cpp
.cpp
6,646
196
// clang-format off /* tests/test_pickling.cpp -- pickle support Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> Copyright (c) 2021 The Pybind Development Team. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #includ...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_tagbased_polymorphic.py
.py
765
30
# -*- coding: utf-8 -*- from pybind11_tests import tagbased_polymorphic as m def test_downcast(): zoo = m.create_zoo() assert [type(animal) for animal in zoo] == [ m.Labrador, m.Dog, m.Chihuahua, m.Cat, m.Panther, ] assert [animal.name for animal in zoo] == [ ...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_smart_ptr.py
.py
9,620
319
# -*- coding: utf-8 -*- import pytest m = pytest.importorskip("pybind11_tests.smart_ptr") from pybind11_tests import ConstructorStats # noqa: E402 def test_smart_ptr(capture): # Object1 for i, o in enumerate( [m.make_object_1(), m.make_object_2(), m.MyObject1(3)], start=1 ): assert o.get...
Python
3D
mcellteam/mcell
libs/pybind11/tests/conftest.py
.py
4,841
209
# -*- coding: utf-8 -*- """pytest configuration Extends output capture as needed by pybind11: ignore constructors, optional unordered lines. Adds docstring and exceptions message sanitizers: ignore Python 2 vs 3 differences. """ import contextlib import difflib import gc import re import textwrap import pytest impo...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_smart_ptr.cpp
.cpp
19,040
475
/* tests/test_smart_ptr.cpp -- binding classes with custom reference counting, implicit conversions between types Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #if de...
C++
3D
mcellteam/mcell
libs/pybind11/tests/pybind11_tests.cpp
.cpp
3,686
93
/* tests/pybind11_tests.cpp -- pybind example plugin Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "pybind11_tests.h" #include "constructor_stats.h" #include <...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_custom_type_setup.py
.py
1,114
51
# -*- coding: utf-8 -*- import gc import weakref import pytest import env # noqa: F401 from pybind11_tests import custom_type_setup as m @pytest.fixture def gc_tester(): """Tests that an object is garbage collected. Assumes that any unreferenced objects are fully collected after calling `gc.collect()...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_gil_scoped.cpp
.cpp
1,673
48
/* tests/test_gil_scoped.cpp -- acquire and release gil Copyright (c) 2017 Borja Zarco (Google LLC) <bzarco@google.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/functional.h> #include "pybind11_tests....
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_operator_overloading.py
.py
4,392
156
# -*- coding: utf-8 -*- import pytest import env from pybind11_tests import ConstructorStats from pybind11_tests import operators as m def test_operator_overloading(): v1 = m.Vector2(1, 2) v2 = m.Vector(3, -1) v3 = m.Vector2(1, 2) # Same value as v1, but different instance. assert v1 is not v3 ...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_call_policies.cpp
.cpp
4,118
116
/* tests/test_call_policies.cpp -- keep_alive and call_guard Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "pybind11_tests.h" struct CustomGuard { static bo...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_stl.py
.py
11,662
359
# -*- coding: utf-8 -*- import pytest from pybind11_tests import ConstructorStats, UserType from pybind11_tests import stl as m def test_vector(doc): """std::vector <-> list""" lst = m.cast_vector() assert lst == [1] lst.append(2) assert m.load_vector(lst) assert m.load_vector(tuple(lst)) ...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_numpy_vectorize.cpp
.cpp
4,461
108
/* tests/test_numpy_vectorize.cpp -- auto-vectorize functions over NumPy array arguments Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/numpy.h> #i...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_embed/external_module.cpp
.cpp
543
21
#include <pybind11/pybind11.h> namespace py = pybind11; /* Simple test module/test class to check that the referenced internals data of external pybind11 * modules aren't preserved over a finalize/initialize. */ PYBIND11_MODULE(external_module, m) { class A { public: explicit A(int value) : v{value...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_embed/catch.cpp
.cpp
733
28
// The Catch implementation is compiled here. This is a standalone // translation unit to avoid recompiling it for every test change. #include <pybind11/embed.h> #ifdef _MSC_VER // Silence MSVC C++17 deprecation warning from Catch regarding std::uncaught_exceptions (up to // catch 2.0.1; this should be fixed in the n...
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_embed/test_interpreter.py
.py
280
16
# -*- coding: utf-8 -*- import sys from widget_module import Widget class DerivedWidget(Widget): def __init__(self, message): super(DerivedWidget, self).__init__(message) def the_answer(self): return 42 def argv0(self): return sys.argv[0]
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_embed/test_trampoline.py
.py
300
19
# -*- coding: utf-8 -*- import trampoline_module def func(): class Test(trampoline_module.test_override_cache_helper): def func(self): return 42 return Test() def func2(): class Test(trampoline_module.test_override_cache_helper): pass return Test()
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_embed/test_interpreter.cpp
.cpp
14,173
401
#include <pybind11/embed.h> #ifdef _MSC_VER // Silence MSVC C++17 deprecation warning from Catch regarding std::uncaught_exceptions (up to // catch 2.0.1; this should be fixed in the next catch release after 2.0.1). # pragma warning(disable : 4996) #endif #include <catch.hpp> #include <cstdlib> #include <fstream> ...
C++
3D
mcellteam/mcell
libs/pybind11/tests/extra_python_package/test_files.py
.py
7,578
280
# -*- coding: utf-8 -*- import contextlib import os import string import subprocess import sys import tarfile import zipfile # These tests must be run explicitly # They require CMake 3.15+ (--install) DIR = os.path.abspath(os.path.dirname(__file__)) MAIN_DIR = os.path.dirname(os.path.dirname(DIR)) main_headers = { ...
Python
3D
mcellteam/mcell
libs/pybind11/tests/extra_setuptools/test_setuphelper.py
.py
4,221
152
# -*- coding: utf-8 -*- import os import subprocess import sys from textwrap import dedent import pytest DIR = os.path.abspath(os.path.dirname(__file__)) MAIN_DIR = os.path.dirname(os.path.dirname(DIR)) WIN = sys.platform.startswith("win32") or sys.platform.startswith("cygwin") @pytest.mark.parametrize("parallel", ...
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_cmake_build/main.cpp
.cpp
152
7
#include <pybind11/pybind11.h> namespace py = pybind11; PYBIND11_MODULE(test_cmake_build, m) { m.def("add", [](int i, int j) { return i + j; }); }
C++
3D
mcellteam/mcell
libs/pybind11/tests/test_cmake_build/test.py
.py
273
11
# -*- coding: utf-8 -*- import sys import test_cmake_build if str is not bytes: # If not Python2 assert isinstance(__file__, str) # Test this is properly set assert test_cmake_build.add(1, 2) == 3 print("{} imports, runs, and adds: 1 + 2 = 3".format(sys.argv[1]))
Python
3D
mcellteam/mcell
libs/pybind11/tests/test_cmake_build/embed.cpp
.cpp
673
24
#include <pybind11/embed.h> namespace py = pybind11; PYBIND11_EMBEDDED_MODULE(test_cmake_build, m) { m.def("add", [](int i, int j) { return i + j; }); } int main(int argc, char *argv[]) { if (argc != 2) { throw std::runtime_error("Expected test.py file as the first argument"); } auto *test_py_...
C++
3D
mcellteam/mcell
libs/jsoncpp/CONTRIBUTING.md
.md
5,767
145
# Contributing to JsonCpp ## Building Both CMake and Meson tools are capable of generating a variety of build environments for you preferred development environment. Using cmake or meson you can generate an XCode, Visual Studio, Unix Makefile, Ninja, or other environment that fits your needs. An example of a common ...
Markdown
3D
mcellteam/mcell
libs/jsoncpp/doxybuild.py
.py
7,416
190
"""Script to generate doxygen documentation. """ from __future__ import print_function from __future__ import unicode_literals from devtools import tarball from contextlib import contextmanager import subprocess import traceback import re import os import sys import shutil @contextmanager def cd(newdir): """ h...
Python
3D
mcellteam/mcell
libs/jsoncpp/amalgamate.py
.py
7,052
160
#!/usr/bin/env python """Amalgamate json-cpp library sources into a single source and header file. Works with python2.6+ and python3.4+. Example of invocation (must be invoked from json-cpp top directory): python amalgamate.py """ import os import os.path import sys INCLUDE_PATH = "include/json" SRC_PATH = "src/lib...
Python
3D
mcellteam/mcell
libs/jsoncpp/include/json/allocator.h
.h
2,481
90
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_ALLOCATOR_H_INCLUDED #define JSON_ALLOCATOR_H_INCLUDED #...
Unknown
3D
mcellteam/mcell
libs/jsoncpp/include/json/value.h
.h
30,169
935
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_H_INCLUDED #define JSON_H_INCLUDED #if !defined(JSON_IS_...
Unknown
3D
mcellteam/mcell
libs/jsoncpp/include/json/writer.h
.h
12,202
368
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_WRITER_H_INCLUDED #define JSON_WRITER_H_INCLUDED #if !de...
Unknown
3D
mcellteam/mcell
libs/jsoncpp/include/json/json.h
.h
447
16
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_JSON_H_INCLUDED #define JSON_JSON_H_INCLUDED #include "c...
Unknown
3D
mcellteam/mcell
libs/jsoncpp/include/json/forwards.h
.h
917
44
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_FORWARDS_H_INCLUDED #define JSON_FORWARDS_H_INCLUDED #if...
Unknown
3D
mcellteam/mcell
libs/jsoncpp/include/json/config.h
.h
5,673
165
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_CONFIG_H_INCLUDED #define JSON_CONFIG_H_INCLUDED #include...
Unknown
3D
mcellteam/mcell
libs/jsoncpp/include/json/version.h
.h
966
29
#ifndef JSON_VERSION_H_INCLUDED #define JSON_VERSION_H_INCLUDED // Note: version must be updated in three places when doing a release. This // annoying process ensures that amalgamate, CMake, and meson all report the // correct version. // 1. /meson.build // 2. /include/json/version.h // 3. /CMakeLists.txt // IMPORTAN...
Unknown
3D
mcellteam/mcell
libs/jsoncpp/include/json/reader.h
.h
14,114
404
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_READER_H_INCLUDED #define JSON_READER_H_INCLUDED #if !de...
Unknown
3D
mcellteam/mcell
libs/jsoncpp/include/json/assertions.h
.h
2,625
60
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_ASSERTIONS_H_INCLUDED #define JSON_ASSERTIONS_H_INCLUDED ...
Unknown
3D
mcellteam/mcell
libs/jsoncpp/include/json/json_features.h
.h
1,793
62
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_FEATURES_H_INCLUDED #define JSON_FEATURES_H_INCLUDED #if...
Unknown
3D
mcellteam/mcell
libs/jsoncpp/devtools/licenseupdater.py
.py
3,964
95
"""Updates the license text in source file. """ from __future__ import print_function # An existing license is found if the file starts with the string below, # and ends with the first blank line. LICENSE_BEGIN = "// Copyright " BRIEF_LICENSE = LICENSE_BEGIN + """2007-2010 Baptiste Lepilleur and The JsonCpp Authors /...
Python
3D
mcellteam/mcell
libs/jsoncpp/devtools/tarball.py
.py
2,234
53
# Copyright 2010 Baptiste Lepilleur and The JsonCpp Authors # Distributed under MIT license, or public domain if desired and # recognized in your jurisdiction. # See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE from contextlib import closing import os import tarfile TARGZ_DEFAULT_COMPRESS...
Python
3D
mcellteam/mcell
libs/jsoncpp/devtools/batchbuild.py
.py
11,483
279
from __future__ import print_function import collections import itertools import json import os import os.path import re import shutil import string import subprocess import sys import cgi class BuildDesc: def __init__(self, prepend_envs=None, variables=None, build_type=None, generator=None): self.prepend_...
Python
3D
mcellteam/mcell
libs/jsoncpp/devtools/fixeol.py
.py
2,226
71
# Copyright 2010 Baptiste Lepilleur and The JsonCpp Authors # Distributed under MIT license, or public domain if desired and # recognized in your jurisdiction. # See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE from __future__ import print_function import os.path import sys def fix_source...
Python
3D
mcellteam/mcell
libs/jsoncpp/devtools/__init__.py
.py
250
7
# Copyright 2010 Baptiste Lepilleur and The JsonCpp Authors # Distributed under MIT license, or public domain if desired and # recognized in your jurisdiction. # See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE # module
Python
3D
mcellteam/mcell
libs/jsoncpp/devtools/antglob.py
.py
7,908
206
#!/usr/bin/env python # encoding: utf-8 # Copyright 2009 Baptiste Lepilleur and The JsonCpp Authors # Distributed under MIT license, or public domain if desired and # recognized in your jurisdiction. # See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE from __future__ import print_function f...
Python
3D
mcellteam/mcell
libs/jsoncpp/src/test_lib_json/fuzz.h
.h
423
15
// Copyright 2007-2010 The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef FUZZ_H_INCLUDED #define FUZZ_H_INCLUDED #include <cstddef> #include <stdint.h> exte...
Unknown
3D
mcellteam/mcell
libs/jsoncpp/src/test_lib_json/fuzz.cpp
.cpp
1,971
55
// Copyright 2007-2019 The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #include "fuzz.h" #include <cstdint> #include <json/config.h> #include <json/json.h> #includ...
C++
3D
mcellteam/mcell
libs/jsoncpp/src/test_lib_json/jsontest.h
.h
11,985
289
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSONTEST_H_INCLUDED #define JSONTEST_H_INCLUDED #include <cst...
Unknown
3D
mcellteam/mcell
libs/jsoncpp/src/test_lib_json/jsontest.cpp
.cpp
12,268
431
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #define _CRT_SECURE_NO_WARNINGS 1 // Prevents deprecation warning with...
C++
3D
mcellteam/mcell
libs/jsoncpp/src/test_lib_json/main.cpp
.cpp
135,565
3,807
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #if defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnost...
C++
3D
mcellteam/mcell
libs/jsoncpp/src/lib_json/json_tool.h
.h
3,812
135
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED #define LIB_JSONCPP_JSON_TOOL...
Unknown
3D
mcellteam/mcell
libs/jsoncpp/src/lib_json/json_reader.cpp
.cpp
57,893
1,982
// Copyright 2007-2011 Baptiste Lepilleur and The JsonCpp Authors // Copyright (C) 2016 InfoTeCS JSC. All rights reserved. // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #if !defined(...
C++
3D
mcellteam/mcell
libs/jsoncpp/src/lib_json/json_writer.cpp
.cpp
37,920
1,261
// Copyright 2011 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #if !defined(JSON_IS_AMALGAMATION) #include "json_tool.h" #include <json/wr...
C++
3D
mcellteam/mcell
libs/jsoncpp/src/lib_json/json_value.cpp
.cpp
48,043
1,628
// Copyright 2011 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #if !defined(JSON_IS_AMALGAMATION) #include <json/assertions.h> #include <j...
C++
3D
mcellteam/mcell
libs/jsoncpp/src/jsontestrunner/main.cpp
.cpp
10,855
343
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #if defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnost...
C++
3D
mcellteam/mcell
libs/jsoncpp/test/generate_expected.py
.py
576
18
# Copyright 2007 Baptiste Lepilleur and The JsonCpp Authors # Distributed under MIT license, or public domain if desired and # recognized in your jurisdiction. # See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE from __future__ import print_function import glob import os.path for path in gl...
Python
3D
mcellteam/mcell
libs/jsoncpp/test/cleantests.py
.py
490
17
# Copyright 2007 Baptiste Lepilleur and The JsonCpp Authors # Distributed under MIT license, or public domain if desired and # recognized in your jurisdiction. # See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE """Removes all files created during testing.""" import glob import os paths =...
Python
3D
mcellteam/mcell
libs/jsoncpp/test/pyjsontestrunner.py
.py
2,370
72
# Copyright 2007 Baptiste Lepilleur and The JsonCpp Authors # Distributed under MIT license, or public domain if desired and # recognized in your jurisdiction. # See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE """Simple implementation of a json test runner to run the test against json-py....
Python
3D
mcellteam/mcell
libs/jsoncpp/test/runjsontests.py
.py
8,490
211
# Copyright 2007 Baptiste Lepilleur and The JsonCpp Authors # Distributed under MIT license, or public domain if desired and # recognized in your jurisdiction. # See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE from __future__ import print_function from __future__ import unicode_literals f...
Python
3D
mcellteam/mcell
libs/jsoncpp/test/rununittests.py
.py
2,922
85
# Copyright 2009 Baptiste Lepilleur and The JsonCpp Authors # Distributed under MIT license, or public domain if desired and # recognized in your jurisdiction. # See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE from __future__ import print_function from __future__ import unicode_literals f...
Python