Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
pdbe
ccdutils
Commits
c1caee7b
Commit
c1caee7b
authored
Dec 15, 2020
by
Lukas Pravda
Browse files
rerun black
parent
8aec4c89
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
pdbeccdutils/tests/test_fragment_library.py
pdbeccdutils/tests/test_fragment_library.py
+6
-4
pdbeccdutils/tests/test_write_img.py
pdbeccdutils/tests/test_write_img.py
+1
-1
No files found.
pdbeccdutils/tests/test_fragment_library.py
View file @
c1caee7b
...
...
@@ -6,25 +6,27 @@ import xml.etree.ElementTree as ET
from
pdbeccdutils.core.fragment_library
import
FragmentLibrary
from
pdbeccdutils.helpers.drawing
import
svg_namespace
def
test__img_crated
(
library
,
tmpdir
):
file_path
=
str
(
tmpdir
.
join
(
'
library.svg
'
))
file_path
=
str
(
tmpdir
.
join
(
"
library.svg
"
))
library
.
to_image
(
file_path
)
assert
os
.
path
.
isfile
(
file_path
)
xml
=
ET
.
parse
(
file_path
)
assert
len
(
xml
.
findall
(
'
svg:rect
'
,
svg_namespace
))
>
100
assert
len
(
xml
.
findall
(
"
svg:rect
"
,
svg_namespace
))
>
100
def
test_img_png_created
(
library
,
tmpdir
):
file_path
=
str
(
tmpdir
.
join
(
'
library.png
'
))
file_path
=
str
(
tmpdir
.
join
(
"
library.png
"
))
library
.
to_image
(
file_path
,
source
=
"PDBe"
)
assert
os
.
path
.
isfile
(
file_path
)
def
test_generate_conformers
(
library
):
library
.
generate_conformers
()
for
entry
in
library
.
library
.
values
():
assert
entry
.
mol
.
GetConformers
()
\ No newline at end of file
assert
entry
.
mol
.
GetConformers
()
pdbeccdutils/tests/test_write_img.py
View file @
c1caee7b
...
...
@@ -163,4 +163,4 @@ class TestWriteImg:
png
=
str
(
tmpdir
.
join
(
"test.png"
))
save_no_image
(
png
)
assert
os
.
path
.
join
(
png
)
\ No newline at end of file
assert
os
.
path
.
join
(
png
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment