eranheres / ultra_type

0 stars 0 forks source link

Add unit tests for Model class in model.py #14

Closed sweep-mine[bot] closed 11 months ago

sweep-mine[bot] commented 11 months ago

Description

This pull request adds unit tests for the Model class in model.py to ensure its functionality and behavior.

Summary

Fixes #13.


πŸŽ‰ Latest improvements to Sweep:


πŸ’‘ To get Sweep to edit this pull request, you can:

sweep-mine[bot] commented 11 months ago

Sandbox Executions

poetry run pytest 1/1 ❌ (`2`)
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-7.4.3, pluggy-1.3.0
rootdir: /repo
collected 1 item / 1 error
==================================== ERRORS ====================================
__________________ ERROR collecting ultra_type/test_model.py ___________________
/root/.cache/pypoetry/virtualenvs/ultra-type-gW_DSdP6-py3.10/lib/python3.10/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/root/.cache/pypoetry/virtualenvs/ultra-type-gW_DSdP6-py3.10/lib/python3.10/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
:1050: in _gcd_import
    ???
:1027: in _find_and_load
    ???
:1006: in _find_and_load_unlocked
    ???
:688: in _load_unlocked
    ???
/root/.cache/pypoetry/virtualenvs/ultra-type-gW_DSdP6-py3.10/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:177: in exec_module
    source_stat, co = _rewrite_test(fn, self.config)
/root/.cache/pypoetry/virtualenvs/ultra-type-gW_DSdP6-py3.10/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:359: in _rewrite_test
    tree = ast.parse(source, filename=strfn)
/usr/lib/python3.10/ast.py:50: in parse
    return compile(source, filename, mode, flags,
E     File "/repo/ultra_type/test_model.py", line 108
E       def setUp(self):
E       ^^^
E   IndentationError: expected an indented block after class definition on line 104
=========================== short test summary info ============================
ERROR ultra_type/test_model.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.33s ===============================

poetry run pytest 1/1 ❌ (`2`)
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-7.4.3, pluggy-1.3.0
rootdir: /repo
collected 1 item / 1 error
==================================== ERRORS ====================================
__________________ ERROR collecting ultra_type/test_model.py ___________________
/root/.cache/pypoetry/virtualenvs/ultra-type-gW_DSdP6-py3.10/lib/python3.10/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/root/.cache/pypoetry/virtualenvs/ultra-type-gW_DSdP6-py3.10/lib/python3.10/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
:1050: in _gcd_import
    ???
:1027: in _find_and_load
    ???
:1006: in _find_and_load_unlocked
    ???
:688: in _load_unlocked
    ???
/root/.cache/pypoetry/virtualenvs/ultra-type-gW_DSdP6-py3.10/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:177: in exec_module
    source_stat, co = _rewrite_test(fn, self.config)
/root/.cache/pypoetry/virtualenvs/ultra-type-gW_DSdP6-py3.10/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:359: in _rewrite_test
    tree = ast.parse(source, filename=strfn)
/usr/lib/python3.10/ast.py:50: in parse
    return compile(source, filename, mode, flags,
E     File "/repo/ultra_type/test_model.py", line 138
E       =======
E   IndentationError: unexpected unindent
=========================== short test summary info ============================
ERROR ultra_type/test_model.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.39s ===============================

poetry run pytest 1/1 ❌ (`2`)
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-7.4.3, pluggy-1.3.0
rootdir: /repo
collected 1 item / 1 error
==================================== ERRORS ====================================
__________________ ERROR collecting ultra_type/test_model.py ___________________
/root/.cache/pypoetry/virtualenvs/ultra-type-gW_DSdP6-py3.10/lib/python3.10/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/root/.cache/pypoetry/virtualenvs/ultra-type-gW_DSdP6-py3.10/lib/python3.10/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
:1050: in _gcd_import
    ???
:1027: in _find_and_load
    ???
:1006: in _find_and_load_unlocked
    ???
:688: in _load_unlocked
    ???
/root/.cache/pypoetry/virtualenvs/ultra-type-gW_DSdP6-py3.10/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:177: in exec_module
    source_stat, co = _rewrite_test(fn, self.config)
/root/.cache/pypoetry/virtualenvs/ultra-type-gW_DSdP6-py3.10/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:359: in _rewrite_test
    tree = ast.parse(source, filename=strfn)
/usr/lib/python3.10/ast.py:50: in parse
    return compile(source, filename, mode, flags,
E     File "/repo/ultra_type/test_model.py", line 108
E       def setUp(self):
E       ^^^
E   IndentationError: expected an indented block after class definition on line 104
=========================== short test summary info ============================
ERROR ultra_type/test_model.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.33s ===============================

sweep-mine[bot] commented 11 months ago

Apply Sweep Rules to your PR?