mirror of
https://github.com/gmihaila/ml_things.git
synced 2021-10-04 01:29:04 +03:00
unittesting added
This commit is contained in:
@@ -1,6 +1,17 @@
|
|||||||
# flake8: noqa
|
|
||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
# Copyright 2020 George Mihaila.
|
# Copyright 2020 George Mihaila.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
__version__ = "0.0.1"
|
__version__ = "0.0.1"
|
||||||
|
|
||||||
|
|||||||
14
tests/__init__.py
Normal file
14
tests/__init__.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# coding=utf-8
|
||||||
|
# Copyright 2020 George Mihaila.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
46
tests/test_array_functions.py
Normal file
46
tests/test_array_functions.py
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# coding=utf-8
|
||||||
|
# Copyright 2020 George Mihaila.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
"""
|
||||||
|
Unittesting array related functions.
|
||||||
|
|
||||||
|
Run: python -m unittest test_array_functions
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
from ml_things import (
|
||||||
|
batch_array,
|
||||||
|
pad_array,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class TestPadArray(unittest.TestCase):
|
||||||
|
def test_type(self):
|
||||||
|
# Make sure type errors are raised when necessary
|
||||||
|
pass
|
||||||
|
|
||||||
|
def test_pad_array(self):
|
||||||
|
# Test a sample of pad_array.
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class TestBatchArray(unittest.TestCase):
|
||||||
|
def test_type(self):
|
||||||
|
# Make sure type errors are raised when necessary
|
||||||
|
pass
|
||||||
|
|
||||||
|
def test_batch_array(self):
|
||||||
|
# Test a sample of batch_array.
|
||||||
|
pass
|
||||||
22
tests/test_plot_functions.py
Normal file
22
tests/test_plot_functions.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# coding=utf-8
|
||||||
|
# Copyright 2020 George Mihaila.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
"""
|
||||||
|
Unittesting plot functions.
|
||||||
|
|
||||||
|
Run: python -m unittest test_plot_funcitons
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Work in progress
|
||||||
BIN
tests/test_samples/plot_array.png
Normal file
BIN
tests/test_samples/plot_array.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
BIN
tests/test_samples/plot_confusion_matrix.png
Normal file
BIN
tests/test_samples/plot_confusion_matrix.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
BIN
tests/test_samples/plot_dict.png
Normal file
BIN
tests/test_samples/plot_dict.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
22
tests/test_text_functions.py
Normal file
22
tests/test_text_functions.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# coding=utf-8
|
||||||
|
# Copyright 2020 George Mihaila.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
"""
|
||||||
|
Unittesting text related functions.
|
||||||
|
|
||||||
|
Run: python -m unittest test_text_functions
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Work in progress
|
||||||
22
tests/test_web_related.py
Normal file
22
tests/test_web_related.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# coding=utf-8
|
||||||
|
# Copyright 2020 George Mihaila.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
"""
|
||||||
|
Unittesting web realted functions.
|
||||||
|
|
||||||
|
Run: python -m unittest test_web_related
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Work in progress
|
||||||
Reference in New Issue
Block a user