Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pyuff
#4
I believe that __mains__ is an error. it should be __main__.
One way to run the tests is to run each script in test folder separately. That is why they have the last two lines in each file at the end. In this case it will use numpy built-in testing support which is based on nose. However due to mistake with __mains__ vs. __main__ I believe they don't runt it even once this way. Otherwise they would have discovered the mistake.
Because numpy uses nose, I believe they were running nosetests from command line and nose just grabs all tests from the files in test folder (based on the name) and execute them one by one.
Here is more info or nose and testing with nose http://nose.readthedocs.io/en/latest/testing.html

There are also other test suites, incl. unittest module from standard python library, pytest, etc.

there are plenty of resources online on unittesting, just google the term if you wnat more info
Reply


Messages In This Thread
pyuff - by Ragnar - Mar-08-2018, 03:53 PM
RE: pyuff - by buran - Mar-09-2018, 07:27 AM
RE: pyuff - by Ragnar - Mar-09-2018, 09:28 AM
RE: pyuff - by buran - Mar-09-2018, 09:56 AM
RE: pyuff - by Ragnar - Mar-09-2018, 02:02 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020