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:
@@ -1,6 +1,4 @@
|
||||
*.pyc
|
||||
GithubCredentials.py
|
||||
.coverage
|
||||
/dist
|
||||
/MANIFEST
|
||||
/test/htmlcov/
|
||||
|
||||
@@ -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 )
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
./run_tests.sh
|
||||
python setup.py test
|
||||
|
||||
previousVersion=$( grep 'version =' setup.py | sed 's/.*version = \"\(.*\)\".*/\1/' )
|
||||
echo "Next version number? (previous: '$previousVersion')"
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm -f $(find . -name "*.pyc")
|
||||
|
||||
cd test
|
||||
|
||||
coverage erase
|
||||
coverage run --branch IntegrationTest.py
|
||||
|
||||
echo "=============================="
|
||||
echo "|| Coverage (shall be 100%) ||"
|
||||
echo "=============================="
|
||||
|
||||
coverage report -m --include=../github/*
|
||||
|
||||
coverage html --include=../github/*
|
||||
@@ -16,18 +16,18 @@
|
||||
from distutils.core import setup, Command
|
||||
import textwrap
|
||||
|
||||
class TestCommand( Command ):
|
||||
class test( Command ):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
def initialize_options( self ):
|
||||
pass
|
||||
|
||||
def finalize_options(self):
|
||||
def finalize_options( self ):
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
import sys, subprocess
|
||||
raise SystemExit( subprocess.call( [ sys.executable, "test/IntegrationTest.py" ] ) )
|
||||
def run( self ):
|
||||
import github.tests
|
||||
github.tests.run()
|
||||
|
||||
setup(
|
||||
name = "PyGithub",
|
||||
@@ -66,9 +66,10 @@ setup(
|
||||
See http://vincent-jacques.net/PyGithub""" ),
|
||||
packages = [
|
||||
"github",
|
||||
"github.tests",
|
||||
],
|
||||
package_data = {
|
||||
"github": [ "ReadMe.md", "COPYING*", "doc/*.md" ]
|
||||
"github": [ "ReadMe.md", "COPYING*", "doc/*.md", "tests/ReplayData/*.txt" ]
|
||||
},
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
@@ -79,5 +80,5 @@ setup(
|
||||
"Programming Language :: Python",
|
||||
"Topic :: Software Development",
|
||||
],
|
||||
cmdclass = { "test": TestCommand },
|
||||
cmdclass = { "test": test },
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user