Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some infrastructure for unit tests #108

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ If you need to modify it or amend it in some way, you should always appropriatel
Also see: [Github Help: Using Pull Requests](https://help.github.com/articles/using-pull-requests/)


### Running Tests

To run unit tests, simply run:

```bash
python3 -m unittest discover
```


### Need help?

You can always ask for help in our IRC channel, `#Hearthsim` on [Freenode](https://freenode.net/).
6 changes: 3 additions & 3 deletions unitypack/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pkg_resources


__version__ = pkg_resources.require("unitypack")[0].version
if __name__ == '__main__':
import pkg_resources
__version__ = pkg_resources.require("unitypack")[0].version


def load(file, env=None):
Expand Down
Empty file added unitypack/test/__init__.py
Empty file.
1 change: 1 addition & 0 deletions unitypack/test/fixtures/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixtures are currently built manually using [Unity Asset Bundle Browser tool](https://github.com/Unity-Technologies/AssetBundles-Browser) in the Unity Editor.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ManifestFileVersion: 0
CRC: 454576840
Hashes:
AssetFileHash:
serializedVersion: 2
Hash: ae5ad6387bb316cd93b359f260b990ce
TypeTreeHash:
serializedVersion: 2
Hash: 3f7d0c5e0986ec71841622bcb2f9be1c
HashAppended: 0
ClassTypes:
- Class: 83
Script: {instanceID: 0}
Assets:
- Assets/Bruh - Sound Effect (HD) [D2_r4q2imnQ].mp3
- Assets/Bruh - Sound Effect (HD) [D2_r4q2imnQ].wav
Dependencies: []
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ManifestFileVersion: 0
CRC: 802265369
Hashes:
AssetFileHash:
serializedVersion: 2
Hash: d636de81326fb6ccce55ea9e2d2cf878
TypeTreeHash:
serializedVersion: 2
Hash: 5ad585dd02dfb5016c0dad519eab8f49
HashAppended: 0
ClassTypes:
- Class: 49
Script: {instanceID: 0}
Assets:
- Assets/example.txt
Dependencies: []
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ManifestFileVersion: 0
CRC: 802265369
Hashes:
AssetFileHash:
serializedVersion: 2
Hash: 3e47ce8a9ba896cddc171921cbdbe28f
TypeTreeHash:
serializedVersion: 2
Hash: 5ad585dd02dfb5016c0dad519eab8f49
HashAppended: 0
ClassTypes:
- Class: 49
Script: {instanceID: 0}
Assets:
- Assets/example.txt
Dependencies: []
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ManifestFileVersion: 0
CRC: 668520680
Hashes:
AssetFileHash:
serializedVersion: 2
Hash: 316393cb9cd8b38d63e4d44bb3ef4c47
TypeTreeHash:
serializedVersion: 2
Hash: 5ad585dd02dfb5016c0dad519eab8f49
HashAppended: 0
ClassTypes:
- Class: 49
Script: {instanceID: 0}
Assets:
- Assets/example.txt
Dependencies: []
73 changes: 73 additions & 0 deletions unitypack/test/fixtures/projects/example-bundles/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
#
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/
/[Aa]sset[Bb]undles/

# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/

# Recordings can get excessive in size
/[Rr]ecordings/

# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*

# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains*

# Visual Studio cache directory
.vs/

# Gradle cache directory
.gradle/

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db

# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta

# Unity3D generated file on crash reports
sysinfo.txt

# Builds
*.apk
*.aab
*.unitypackage
*.app

# Crashlytics generated file
crashlytics-build.properties

# Packed Addressables
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*

# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"files.exclude":
{
"**/.DS_Store":true,
"**/.git":true,
"**/.gitignore":true,
"**/.gitmodules":true,
"**/*.booproj":true,
"**/*.pidb":true,
"**/*.suo":true,
"**/*.user":true,
"**/*.userprefs":true,
"**/*.unityproj":true,
"**/*.dll":true,
"**/*.exe":true,
"**/*.pdf":true,
"**/*.mid":true,
"**/*.midi":true,
"**/*.wav":true,
"**/*.gif":true,
"**/*.ico":true,
"**/*.jpg":true,
"**/*.jpeg":true,
"**/*.png":true,
"**/*.psd":true,
"**/*.tga":true,
"**/*.tif":true,
"**/*.tiff":true,
"**/*.3ds":true,
"**/*.3DS":true,
"**/*.fbx":true,
"**/*.FBX":true,
"**/*.lxo":true,
"**/*.LXO":true,
"**/*.ma":true,
"**/*.MA":true,
"**/*.obj":true,
"**/*.OBJ":true,
"**/*.asset":true,
"**/*.cubemap":true,
"**/*.flare":true,
"**/*.mat":true,
"**/*.meta":true,
"**/*.prefab":true,
"**/*.unity":true,
"build/":true,
"Build/":true,
"Library/":true,
"library/":true,
"obj/":true,
"Obj/":true,
"ProjectSettings/":true,
"temp/":true,
"Temp/":true
}
}
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading