Skip to content

Tests fail #3

Open
Open
@Serge3leo

Description

@Serge3leo

For Python 3.11, setuptools 68.0.0 and numpy 1.25.1:

  • python setup.py test - completely fails;
  • pytest - 1 failed, 25 passed, 1 warning:
________________________________ TestSumsq.runTest _________________________________

self = <test_util.TestSumsq testMethod=runTest>

    def runTest(self):
        n = 10
        x = np.sin(np.arange(n))
        normx = np.sum(x**2)
>       self.assertAlmostEqual(normx, sumsq(x), 'Wrong answer')
E       TypeError: 'str' object cannot be interpreted as an integer

dfogn/tests/test_util.py:41: TypeError

For Python 2.7.18, setuptools 44.0.0.post20200102 and numpy 1.16.5:

  • python setup.py test - Test failed: <unittest.runner.TextTestResult run=26 errors=1 failures=0>:
======================================================================
ERROR: runTest (test_util.TestSumsq)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/leo/soft/valq/Yandex-Q/fortran_magic/dfogn-up/dfogn/tests/test_util.py", line 41, in runTest
    self.assertAlmostEqual(normx, sumsq(x), 'Wrong answer')
  File "/Users/leo/opt/anaconda3/envs/tfm27/lib/python2.7/unittest/case.py", line 555, in assertAlmostEqual
    if round(abs(second-first), places) == 0:
TypeError: 'unicode' object cannot be interpreted as an index

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions