Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
dbcc12fe
Commit
dbcc12fe
authored
13 years ago
by
Ansgar Philippsen
Browse files
Options
Downloads
Patches
Plain Diff
fixed mol/numpy unit test to use project convention
parent
2869597f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/mol/base/tests/CMakeLists.txt
+1
-0
1 addition, 0 deletions
modules/mol/base/tests/CMakeLists.txt
modules/mol/base/tests/test_numpy.py
+9
-4
9 additions, 4 deletions
modules/mol/base/tests/test_numpy.py
with
10 additions
and
4 deletions
modules/mol/base/tests/CMakeLists.txt
+
1
−
0
View file @
dbcc12fe
...
@@ -13,6 +13,7 @@ set(OST_MOL_BASE_UNIT_TESTS
...
@@ -13,6 +13,7 @@ set(OST_MOL_BASE_UNIT_TESTS
test_view.cc
test_view.cc
test_view_op.cc
test_view_op.cc
tests.cc
tests.cc
test_numpy.py
)
)
ost_unittest
(
MODULE mol SOURCES
"
${
OST_MOL_BASE_UNIT_TESTS
}
"
)
ost_unittest
(
MODULE mol SOURCES
"
${
OST_MOL_BASE_UNIT_TESTS
}
"
)
...
...
This diff is collapsed.
Click to expand it.
modules/mol/base/tests/test_numpy.py
+
9
−
4
View file @
dbcc12fe
import
sys
,
unittest
import
unittest
sys
.
path
.
append
(
"
../../../../stage/lib/openstructure
"
)
sys
.
path
.
append
(
"
../../../../stage/lib64/openstructure
"
)
from
ost
import
*
from
ost
import
*
import
numpy
has_numpy
=
True
try
:
import
numpy
except
ImportError
:
has_numpy
=
False
def
v2v
(
v
):
def
v2v
(
v
):
return
geom
.
Vec3
(
float
(
v
[
0
]),
float
(
v
[
1
]),
float
(
v
[
2
]))
return
geom
.
Vec3
(
float
(
v
[
0
]),
float
(
v
[
1
]),
float
(
v
[
2
]))
...
@@ -15,6 +18,8 @@ class TestNumpy(unittest.TestCase):
...
@@ -15,6 +18,8 @@ class TestNumpy(unittest.TestCase):
pass
pass
def
test_
(
self
):
def
test_
(
self
):
if
not
has_numpy
:
return
entity
=
mol
.
CreateEntity
()
entity
=
mol
.
CreateEntity
()
ed
=
entity
.
EditXCS
()
ed
=
entity
.
EditXCS
()
ch
=
ed
.
InsertChain
(
"
X
"
)
ch
=
ed
.
InsertChain
(
"
X
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment