{"action":"created","issue":{"url":"https://api.github.com/repos/NuGrid/NuGridPy/issues/7","repository_url":"https://api.github.com/repos/NuGrid/NuGridPy","labels_url":"https://api.github.com/repos/NuGrid/NuGridPy/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/NuGrid/NuGridPy/issues/7/comments","events_url":"https://api.github.com/repos/NuGrid/NuGridPy/issues/7/events","html_url":"https://github.com/NuGrid/NuGridPy/pull/7","id":159322042,"number":7,"title":"(+) module testcases using the unittest functionality","user":{"login":"korobkin","id":389823,"avatar_url":"https://avatars.githubusercontent.com/u/389823?v=3","gravatar_id":"","url":"https://api.github.com/users/korobkin","html_url":"https://github.com/korobkin","followers_url":"https://api.github.com/users/korobkin/followers","following_url":"https://api.github.com/users/korobkin/following{/other_user}","gists_url":"https://api.github.com/users/korobkin/gists{/gist_id}","starred_url":"https://api.github.com/users/korobkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/korobkin/subscriptions","organizations_url":"https://api.github.com/users/korobkin/orgs","repos_url":"https://api.github.com/users/korobkin/repos","events_url":"https://api.github.com/users/korobkin/events{/privacy}","received_events_url":"https://api.github.com/users/korobkin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-06-09T03:36:14Z","updated_at":"2016-06-09T07:22:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NuGrid/NuGridPy/pulls/7","html_url":"https://github.com/NuGrid/NuGridPy/pull/7","diff_url":"https://github.com/NuGrid/NuGridPy/pull/7.diff","patch_url":"https://github.com/NuGrid/NuGridPy/pull/7.patch"},"body":"@2sn @fherwig @adam-paul  I've started a new branch to collect testcases, with a separate module `NuGridPy/testcases.py`, which uses the `unittest` functionality (see [unittest docs](https://docs.python.org/2.7/library/unittest.html)). `unittest` allows various interesting ways to run the test suites, the simplest way is to run a command:\r\n```\r\n   python -m NuGridPy.testcases\r\n```\r\n(the parent directory of NuGridPy must be the PYTHONPATH). What do you think?"},"comment":{"url":"https://api.github.com/repos/NuGrid/NuGridPy/issues/comments/224819310","html_url":"https://github.com/NuGrid/NuGridPy/pull/7#issuecomment-224819310","issue_url":"https://api.github.com/repos/NuGrid/NuGridPy/issues/7","id":224819310,"user":{"login":"2sn","id":1273110,"avatar_url":"https://avatars.githubusercontent.com/u/1273110?v=3","gravatar_id":"","url":"https://api.github.com/users/2sn","html_url":"https://github.com/2sn","followers_url":"https://api.github.com/users/2sn/followers","following_url":"https://api.github.com/users/2sn/following{/other_user}","gists_url":"https://api.github.com/users/2sn/gists{/gist_id}","starred_url":"https://api.github.com/users/2sn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2sn/subscriptions","organizations_url":"https://api.github.com/users/2sn/orgs","repos_url":"https://api.github.com/users/2sn/repos","events_url":"https://api.github.com/users/2sn/events{/privacy}","received_events_url":"https://api.github.com/users/2sn/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T07:22:52Z","updated_at":"2016-06-09T07:22:52Z","body":"@korobkin Where do I get the data files?\r\nIdeally, they should be downloaded to some temporary directory (using python's tempfile)\r\n```shell\r\n~/NuGrid>python3 -m NuGridPy.selftest\r\nError: no iso_massf named files exist in Directory\r\nNow returning None\r\nEE.........\r\n======================================================================\r\nERROR: test_abu_chart (__main__.TestAbuChart)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/alex/NuGrid/NuGridPy/selftest.py\", line 45, in test_abu_chart\r\n    raise IOError(\"Cannot locate a set of abundance data files\")\r\nOSError: Cannot locate a set of abundance data files\r\n\r\n======================================================================\r\nERROR: test_abu_evolution (__main__.TestAbuChart)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/alex/NuGrid/NuGridPy/selftest.py\", line 72, in test_abu_evolution\r\n    x=ppn.xtime('.')\r\n  File \"/home/alex/NuGrid/NuGridPy/ppn.py\", line 147, in __init__\r\n    self._readFile(fname,sldir)\r\n  File \"/home/alex/NuGrid/NuGridPy/ppn.py\", line 160, in _readFile\r\n    f=open(fname,'r')\r\nFileNotFoundError: [Errno 2] No such file or directory: './x-time.dat'\r\n\r\n----------------------------------------------------------------------\r\nRan 11 tests in 0.314s\r\n\r\nFAILED (errors=2)\r\n```\r\nvery nice!"}}
{"actor":{"display_login":"2sn"}}