mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Fixes for issue #86
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
# Copyright 2012 Vincent Jacques
|
||||
# vincent@vincent-jacques.net
|
||||
|
||||
# This file is part of PyGithub. http://vincent-jacques.net/PyGithub
|
||||
|
||||
# PyGithub is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public License along with PyGithub. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from AuthenticatedUser import *
|
||||
from Authentication import *
|
||||
from Authorization import *
|
||||
from Branch import *
|
||||
from Commit import *
|
||||
from CommitComment import *
|
||||
from CommitStatus import *
|
||||
from ContentFile import *
|
||||
from Download import *
|
||||
from Event import *
|
||||
from Gist import *
|
||||
from GistComment import *
|
||||
from GitBlob import *
|
||||
from GitCommit import *
|
||||
from Github import *
|
||||
from GitRef import *
|
||||
from GitTag import *
|
||||
from GitTree import *
|
||||
from Hook import *
|
||||
from Issue import *
|
||||
from IssueComment import *
|
||||
from IssueEvent import *
|
||||
from Label import *
|
||||
from Milestone import *
|
||||
from NamedUser import *
|
||||
from Markdown import *
|
||||
from Organization import *
|
||||
from PullRequest import *
|
||||
from PullRequestComment import *
|
||||
from PullRequestFile import *
|
||||
from RateLimiting import *
|
||||
from Repository import *
|
||||
from RepositoryKey import *
|
||||
from Tag import *
|
||||
from Team import *
|
||||
from UserKey import *
|
||||
|
||||
from PaginatedList import *
|
||||
from Exceptions import *
|
||||
from Enterprise import *
|
||||
|
||||
from Issue33 import *
|
||||
from Issue50 import *
|
||||
from Issue54 import *
|
||||
from Issue80 import *
|
||||
@@ -16,9 +16,7 @@ import sys
|
||||
import unittest
|
||||
import httplib
|
||||
import traceback
|
||||
import itertools
|
||||
|
||||
sys.path = [ os.path.join( os.path.dirname( __file__ ), ".." ) ] + sys.path
|
||||
import github
|
||||
|
||||
class FakeHttpResponse:
|
||||
@@ -175,8 +173,5 @@ class TestCase( BasicTestCase ):
|
||||
BasicTestCase.setUp( self )
|
||||
self.g = github.Github( self.login, self.password )
|
||||
|
||||
def main():
|
||||
if "--record" in sys.argv:
|
||||
BasicTestCase.recordMode = True
|
||||
|
||||
unittest.main( argv = [ arg for arg in sys.argv if arg != "--record" ] )
|
||||
def activateRecordMode():
|
||||
BasicTestCase.recordMode = True
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Copyright 2012 Vincent Jacques
|
||||
# vincent@vincent-jacques.net
|
||||
|
||||
# This file is part of PyGithub. http://vincent-jacques.net/PyGithub
|
||||
|
||||
# PyGithub is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public License along with PyGithub. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import unittest
|
||||
|
||||
import AllTests
|
||||
|
||||
def run():
|
||||
unittest.main( module = AllTests, argv = [ "Dummy Script Name" ] )
|
||||
@@ -0,0 +1,15 @@
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
import Framework
|
||||
import AllTests
|
||||
|
||||
def main( argv ):
|
||||
if "--record" in argv:
|
||||
Framework.activateRecordMode()
|
||||
argv = [ arg for arg in argv if arg != "--record" ]
|
||||
|
||||
unittest.main( module = AllTests, argv = argv )
|
||||
|
||||
if __name__ == "__main__":
|
||||
main( sys.argv )
|
||||
Reference in New Issue
Block a user