FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
UnrealEnginePython/tests/test_uobject.py at pr_array_params · dfb/UnrealEnginePython · GitHub
dfb
UnrealEnginePython
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
UnrealEnginePython
/
tests
/
test_uobject.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
36 lines (27 loc) · 1007 Bytes
Breadcrumbs
UnrealEnginePython
/
tests
/
test_uobject.py
Copy path
File metadata and controls
36 lines (27 loc) · 1007 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import
unittest
import
unreal_engine
as
ue
from
unreal_engine
.
classes
import
Material
import
time
import
math
class
TestUObject
(
unittest
.
TestCase
):
def
test_new_object
(
self
):
new_material
=
Material
()
self
.
assertIsNotNone
(
new_material
)
def
test_set_name
(
self
):
new_material
=
Material
()
mat_name
=
'MatTest_'
+
str
(
int
(
time
.
time
()))
new_material
.
set_name
(
mat_name
)
self
.
assertEqual
(
new_material
.
get_name
(),
mat_name
)
def
test_save_package
(
self
):
new_material
=
Material
()
mat_name
=
'MatTestSaved_'
+
str
(
int
(
time
.
time
()))
new_material
.
set_name
(
mat_name
)
package_name
=
'/Game/Tests/MaterialsTest'
+
str
(
int
(
time
.
time
()))
new_material
.
save_package
(
package_name
)
asset_name
=
'{0}.{1}'
.
format
(
package_name
,
mat_name
)
try
:
asset
=
ue
.
get_asset
(
asset_name
)
except
:
asset
=
None
self
.
assertIsNotNone
(
asset
)
ue
.
delete_asset
(
asset_name
)
Back
|
FazBrowse Home
|
New Git URL