{"action":"created","issue":{"url":"https://api.github.com/repos/rhinstaller/pyparted/issues/19","repository_url":"https://api.github.com/repos/rhinstaller/pyparted","labels_url":"https://api.github.com/repos/rhinstaller/pyparted/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/rhinstaller/pyparted/issues/19/comments","events_url":"https://api.github.com/repos/rhinstaller/pyparted/issues/19/events","html_url":"https://github.com/rhinstaller/pyparted/pull/19","id":126461027,"number":19,"title":"Added my first 3 new unittests to test_parted_disk.py","user":{"login":"mhruscak","id":16644181,"avatar_url":"https://avatars.githubusercontent.com/u/16644181?v=3","gravatar_id":"","url":"https://api.github.com/users/mhruscak","html_url":"https://github.com/mhruscak","followers_url":"https://api.github.com/users/mhruscak/followers","following_url":"https://api.github.com/users/mhruscak/following{/other_user}","gists_url":"https://api.github.com/users/mhruscak/gists{/gist_id}","starred_url":"https://api.github.com/users/mhruscak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhruscak/subscriptions","organizations_url":"https://api.github.com/users/mhruscak/orgs","repos_url":"https://api.github.com/users/mhruscak/repos","events_url":"https://api.github.com/users/mhruscak/events{/privacy}","received_events_url":"https://api.github.com/users/mhruscak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-13T16:42:04Z","updated_at":"2016-02-04T15:59:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rhinstaller/pyparted/pulls/19","html_url":"https://github.com/rhinstaller/pyparted/pull/19","diff_url":"https://github.com/rhinstaller/pyparted/pull/19.diff","patch_url":"https://github.com/rhinstaller/pyparted/pull/19.patch"},"body":"Adding first 3 new unittests.\r\n1) DiskAddPartitionTestCase: in comment\r\n2) DiskGetMaxSupportedPartitionCountTestCase: in comment\r\n3) DiskGetMaxLogicalPartitionsTestCase: it is temporary solution, which tests only type of returned value. Actually working on solution, which will tests all defined values one by one.\r\nConsidering 2 options: a)create new class FakeDevice(cloned from Device, inherits from Device), but all returned values are hardcoded except attribute path, which will be changed\r\nb)create directly unittest class, which will inherit from unittest.TestCase and contains all needed attributes, conditions(included in baseclass.py) to make available to change default path of temporary file(/tmp/temp-device-) to one simulating block device based on path(/dev/hd-temp-device, or /tmp/<type>-temp-device)\r\nActually selected b) solution.\r\nPlease, write some comments in return if possible. Some guide will be helpful."},"comment":{"url":"https://api.github.com/repos/rhinstaller/pyparted/issues/comments/179915682","html_url":"https://github.com/rhinstaller/pyparted/pull/19#issuecomment-179915682","issue_url":"https://api.github.com/repos/rhinstaller/pyparted/issues/19","id":179915682,"user":{"login":"atodorov","id":1002300,"avatar_url":"https://avatars.githubusercontent.com/u/1002300?v=3","gravatar_id":"","url":"https://api.github.com/users/atodorov","html_url":"https://github.com/atodorov","followers_url":"https://api.github.com/users/atodorov/followers","following_url":"https://api.github.com/users/atodorov/following{/other_user}","gists_url":"https://api.github.com/users/atodorov/gists{/gist_id}","starred_url":"https://api.github.com/users/atodorov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atodorov/subscriptions","organizations_url":"https://api.github.com/users/atodorov/orgs","repos_url":"https://api.github.com/users/atodorov/repos","events_url":"https://api.github.com/users/atodorov/events{/privacy}","received_events_url":"https://api.github.com/users/atodorov/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T15:59:17Z","updated_at":"2016-02-04T15:59:17Z","body":"@dcantrell - let's leave the `makeSuite()` question aside for a moment.  The latest patch version looks good to me. However I'm seeing a failure:\r\n\r\n```\r\n======================================================================\r\nFAIL: runTest (tests.test_parted_disk.DiskGetMaxSupportedPartitionCountLoopDiskTestCase)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/root/pyparted/tests/test_parted_disk.py\", line 188, in runTest\r\n    self.assertEqual(self.disk.maxSupportedPartitionCount, value_ext_range)\r\nAssertionError: 64 != 256\r\n\r\n----------------------------------------------------------------------\r\n```\r\n\r\nOn my test system ext_range is 256 for both sda and loop0.  Why does self.disk.maxSupportedPartitionCount return 64 ? "}}