Debian Codegraph @

test/jpypetest/test_zzz.py

raw symbols SCIP
1 # *****************************************************************************
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 #
15 # See NOTICE file for details.
16 #
17 # *****************************************************************************
18 import sys
19 import _jpype
20 import jpype
21 from jpype.types import *
22 from jpype import JPackage, java
23 import common
24 import pytest
25 try:
26 import numpy as np
27 except ImportError:
28 pass
29
30
31 class ZZZTestCase(common.JPypeTestCase):
32
33 def setUp(self):
34 common.JPypeTestCase.setUp(self)
35
36 def testShutdown(self):
37 # Install a coverage hook
38 instance = JClass("org.jpype.JPypeContext").getInstance()
39 JClass("jpype.common.OnShutdown").addCoverageHook(instance)
40
41 # Shutdown
42 jpype.shutdownJVM()
43
44 # Check that shutdown does not raise
45 jpype._core._JTerminate()