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

Tests fail #3

Open
Serge3leo opened this issue Jul 31, 2023 · 0 comments
Open

Tests fail #3

Serge3leo opened this issue Jul 31, 2023 · 0 comments

Comments

@Serge3leo
Copy link

Serge3leo commented Jul 31, 2023

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
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

1 participant