Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F63668050
test_copy_svg_files.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, May 21, 17:48
Size
916 B
Mime Type
text/x-python
Expires
Thu, May 23, 17:48 (2 d)
Engine
blob
Format
Raw Data
Handle
17804260
Attached To
rNIETZSCHEPYTHON nietzsche-python
test_copy_svg_files.py
View Options
import
unittest
from
os
import
sep
,
path
,
remove
,
listdir
from
os.path
import
isdir
,
isfile
,
dirname
,
basename
import
shutil
import
sys
import
lxml.etree
as
ET
import
sys
import
tempfile
import
warnings
sys
.
path
.
append
(
'svgscripts'
)
import
copy_svg_files
class
TestCopy
(
unittest
.
TestCase
):
def
setUp
(
self
):
copy_svg_files
.
UNITTESTING
=
True
DATADIR
=
path
.
dirname
(
__file__
)
+
sep
+
'test_data'
self
.
faksimile_dir
=
DATADIR
+
sep
+
'faksimile_svg'
self
.
faksimile_file
=
self
.
faksimile_dir
+
sep
+
'N-VII-1,5et6.svg'
self
.
tmp_dir
=
tempfile
.
mkdtemp
()
def
test_main
(
self
):
copy_svg_files
.
main
([
self
.
faksimile_dir
,
self
.
tmp_dir
])
self
.
assertEqual
(
isfile
(
self
.
tmp_dir
+
sep
+
basename
(
self
.
faksimile_file
)),
True
)
def
tearDown
(
self
):
shutil
.
rmtree
(
self
.
tmp_dir
,
ignore_errors
=
True
)
if
__name__
==
"__main__"
:
unittest
.
main
()
Event Timeline
Log In to Comment