Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
threevis
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
threevis
threevis
Commits
d07d3091
Commit
d07d3091
authored
Feb 05, 2018
by
Dario Seyb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added simple test
parent
8715c82f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
setup.py
setup.py
+0
-2
tests/.gitkeep
tests/.gitkeep
+0
-0
tests/test_indexed_attributes.py
tests/test_indexed_attributes.py
+18
-0
No files found.
setup.py
View file @
d07d3091
...
...
@@ -17,7 +17,5 @@ setup(name='meshvis',
'numpy'
,
'pythreejs'
],
test_suite
=
'nose.collector'
,
tests_require
=
[
'nose'
],
include_package_data
=
True
,
zip_safe
=
False
)
tests/.gitkeep
deleted
100644 → 0
View file @
8715c82f
tests/test_indexed_attributes.py
0 → 100644
View file @
d07d3091
import
unittest
import
meshvis
class
IndexedAttributes
(
unittest
.
TestCase
):
quad_verts
=
[[
0
,
0
,
0
],
[
1
,
0
,
0
],
[
1
,
1
,
0
],
[
0
,
1
,
0
]]
quad_faces
=
[[
0
,
1
,
2
],
[
0
,
2
,
3
]]
def
point_attribute
(
self
):
attrib
=
meshvis
.
PointAttribute
([
'a'
,
'b'
,
'c, ''d'
])
resolved_attrib
=
meshvis
.
resolve_attributes
(
self
.
quad_faces
,
[
attrib
])
self
.
assertEqual
(
len
(
resolved_attrib
),
6
)
self
.
assertListEqual
(
resolved_attrib
,
[
'a'
,
'b'
,
'c'
,
'a'
,
'c'
,
'd'
])
if
__name__
==
'__main__'
:
suite
=
unittest
.
TestLoader
().
loadTestsFromTestCase
(
IndexedAttributes
)
unittest
.
TextTestRunner
(
verbosity
=
2
).
run
(
suite
)
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