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

Unit test errors #47

Open
toddrme2178 opened this issue Aug 1, 2019 · 1 comment
Open

Unit test errors #47

toddrme2178 opened this issue Aug 1, 2019 · 1 comment

Comments

@toddrme2178
Copy link

I am getting the following unit tests errors:

=================================== FAILURES ===================================
______________ TestIntervalInit.test_string_as_constructor_param _______________

self = <tests.interval.test_initialization.TestIntervalInit object at 0xb69e718c>

    def test_string_as_constructor_param(self):
        with raises(TypeError) as e:
            FloatInterval('(0.2, 0.5)')
>       assert (
            'First argument should be a list or tuple. If you wish to '
            'initialize an interval from string, use from_string factory '
            'method.'
        ) in str(e)
E       AssertionError: assert 'First argument should be a list or tuple. If you wish to initialize an interval from string, use from_string factory method.' in '<ExceptionInfo TypeError tblen=2>'
E        +  where '<ExceptionInfo TypeError tblen=2>' = str(<ExceptionInfo TypeError tblen=2>)

tests/interval/test_initialization.py:22: AssertionError
____________________ TestIntervalInit.test_invalid_argument ____________________

self = <tests.interval.test_initialization.TestIntervalInit object at 0xb68ff0ec>

    def test_invalid_argument(self):
        with raises(IllegalArgument) as e:
            FloatInterval((0, 0))
>       assert (
            'The bounds may be equal only if at least one of the bounds is '
            'closed.'
        ) in str(e)
E       AssertionError: assert 'The bounds may be equal only if at least one of the bounds is closed.' in '<ExceptionInfo IllegalArgument tblen=2>'
E        +  where '<ExceptionInfo IllegalArgument tblen=2>' = str(<ExceptionInfo IllegalArgument tblen=2>)

tests/interval/test_initialization.py:31: AssertionError
===================== 2 failed, 218 passed in 1.18 seconds =====================

Here are the packages I am using:

  • python = 3.7.3-1.2
  • appdirs = 1.4.3
  • atomicwrites = 1.3.0
  • attrs = 19.1.0
  • entrypoints = 0.3
  • flake8 = 3.7.8
  • importlib-metadata = 0.17
  • infinity = 1.4
  • isort = 4.3.21
  • mccabe = 0.6.1
  • more-itertools = 5.0.0
  • packaging = 19.0
  • pluggy = 0.12.0
  • py = 1.8.0
  • pycodestyle = 2.5.0
  • pyflakes = 2.1.1
  • pyparsing = 2.4.0
  • pytest = 5.0.1
  • setuptools = 41.0.1
  • six = 1.12.0
  • wcwidth = 0.1.7
  • zipp = 0.5.2
@AlexandreDecan
Copy link

Can I suggest you to have a look at https://github.com/AlexandreDecan/portion ? It's a Python library providing data structure and operations for intervals (atomic and interval sets).

Apologies, it's a bit of publicity for another project, but this repository does not seem to be maintained anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants