python-necpp icon indicating copy to clipboard operation
python-necpp copied to clipboard

Old syntax in pyNEC test folder

Open rounaksingh opened this issue 7 years ago • 1 comments

Hi, While running $ python setup.py test

It worked well for example 1-3 and half of example 4. I received ERROR for example 4-and beyond. I think the old syntax is in place.

test_example4 (tests.test_get_gain.TestDipoleGain) ... ERROR
test_patch (tests.test_multiple_sc_cards.TestSurfacePatches) ... ERROR

======================================================================
ERROR: test_example4 (tests.test_get_gain.TestDipoleGain)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\users\blue\desktop\python-necpp\pynec\tests\test_get_gain.py", line 25, in test_example4
    nec = nec_create()
NameError: name 'nec_create' is not defined

======================================================================
ERROR: test_patch (tests.test_multiple_sc_cards.TestSurfacePatches)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\users\blue\desktop\python-necpp\pynec\tests\test_multiple_sc_cards.py", line 61, in test_patch
    self.handle_nec(nec_sp_card(nec, 3, 0.019000, -0.001424, 0.078830, 0.019000, 0.001424, 0.078830))
AttributeError: 'TestSurfacePatches' object has no attribute 'handle_nec'

----------------------------------------------------------------------
Ran 6 tests in 0.326s

FAILED (errors=2)
Test failed: <unittest.runner.TextTestResult run=6 errors=2 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=6 errors=2 failures=0>```

Thanks

rounaksingh avatar Dec 05 '17 09:12 rounaksingh

I have updated one of these files, and added some more interfaces to the nec_context SWIG interface. test_multiple_sc_cards.TestSurfacePatches still needs conversion.

tmolteno avatar Aug 29 '19 14:08 tmolteno