Belle II Software
light-2403-persian
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
Variables
Typedefs
a
b
c
d
l
m
n
p
r
s
w
Enumerations
Enumerator
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
c
d
e
f
h
i
m
o
p
r
s
t
v
w
Enumerations
b
c
e
g
h
m
p
s
t
v
Enumerator
b
c
k
t
Related Functions
Files
File List
File Members
All
Functions
test_embedding_example.py
1
#!/usr/bin/env python3
2
3
10
11
import
os
12
import
sys
13
import
subprocess
14
import
unittest
15
from
basf2
import
find_file
16
from
b2test_utils
import
clean_working_directory
17
18
19
class
TestEmbedding
(unittest.TestCase):
20
"""Test to run the embedding example."""
21
22
@unittest.skipIf(not os.getenv('BELLE2_EXAMPLES_DATA_DIR')
,
23
"$BELLE2_EXAMPLES_DATA_DIR not found."
)
24
def
testEmbedding
(self):
25
"""
26
Test the embedding example.
27
"""
28
embedding_example = find_file(
'analysis/examples/embedding/embedding.py'
)
29
30
result = subprocess.run([
'basf2'
, embedding_example], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
31
if
result.returncode != 0:
32
# failure running tutorial so let's print the output
33
# on stderr so it's not split from output of unittest
34
# done like this since we don't want to decode/encode utf8
35
sys.stdout.buffer.write(result.stdout)
36
37
self.assertEqual(result.returncode, 0)
38
39
40
if
__name__ ==
'__main__'
:
41
with
clean_working_directory():
42
unittest.main()
test_embedding_example.TestEmbedding
Definition:
test_embedding_example.py:19
test_embedding_example.TestEmbedding.testEmbedding
def testEmbedding(self)
Definition:
test_embedding_example.py:24
analysis
tests
test_embedding_example.py
Generated on Fri Apr 12 2024 06:49:48 for Belle II Software by
1.9.1