-
Notifications
You must be signed in to change notification settings - Fork 383
Adding deprecation as dependency #568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
|
||
failed = False | ||
|
||
|
||
def run_test_suite(): | ||
import unittest | ||
|
||
|
@@ -42,11 +43,12 @@ def addFailure(self, test, err): | |
class TrackingTextTestRunner(unittest.TextTestRunner): | ||
def _makeResult(self): | ||
return _TrackingTextTestResult( | ||
self.stream, self.descriptions, self.verbosity) | ||
self.stream, self.descriptions, self.verbosity | ||
) | ||
|
||
original_cwd = os.path.abspath(os.getcwd()) | ||
os.chdir('tests') | ||
suite = unittest.defaultTestLoader.discover('.') | ||
os.chdir("tests") | ||
suite = unittest.defaultTestLoader.discover(".") | ||
runner = TrackingTextTestRunner(verbosity=2) | ||
runner.run(suite) | ||
os.chdir(original_cwd) | ||
|
@@ -60,15 +62,17 @@ def run_test_suite_with_junit_output(): | |
except ImportError: | ||
import unittest | ||
import xmlrunner | ||
|
||
original_cwd = os.path.abspath(os.getcwd()) | ||
os.chdir('tests') | ||
suite = unittest.defaultTestLoader.discover('.') | ||
xmlrunner.XMLTestRunner(output='../test-reports').run(suite) | ||
os.chdir("tests") | ||
suite = unittest.defaultTestLoader.discover(".") | ||
xmlrunner.XMLTestRunner(output="../test-reports").run(suite) | ||
os.chdir(original_cwd) | ||
|
||
|
||
class CoverageCommand(Command): | ||
"""setup.py command to run code coverage of the test suite.""" | ||
|
||
description = "Create an HTML coverage report from running the full test suite." | ||
user_options = [] | ||
|
||
|
@@ -84,15 +88,16 @@ def run(self): | |
except ImportError: | ||
print("Could not import coverage. Please install it and try again.") | ||
exit(1) | ||
cov = coverage.coverage(source=['splunklib']) | ||
cov = coverage.coverage(source=["splunklib"]) | ||
cov.start() | ||
run_test_suite() | ||
cov.stop() | ||
cov.html_report(directory='coverage_report') | ||
cov.html_report(directory="coverage_report") | ||
|
||
|
||
class TestCommand(Command): | ||
"""setup.py command to run the whole test suite.""" | ||
|
||
description = "Run test full test suite." | ||
user_options = [] | ||
|
||
|
@@ -110,6 +115,7 @@ def run(self): | |
|
||
class JunitXmlTestCommand(Command): | ||
"""setup.py command to run the whole test suite.""" | ||
|
||
description = "Run test full test suite with JUnit-formatted output." | ||
user_options = [] | ||
|
||
|
@@ -125,28 +131,19 @@ def run(self): | |
|
||
setup( | ||
author="Splunk, Inc.", | ||
|
||
author_email="[email protected]", | ||
|
||
cmdclass={'coverage': CoverageCommand, | ||
'test': TestCommand, | ||
'testjunit': JunitXmlTestCommand}, | ||
|
||
cmdclass={ | ||
"coverage": CoverageCommand, | ||
"test": TestCommand, | ||
"testjunit": JunitXmlTestCommand, | ||
}, | ||
description="The Splunk Software Development Kit for Python.", | ||
|
||
license="http://www.apache.org/licenses/LICENSE-2.0", | ||
|
||
name="splunk-sdk", | ||
|
||
packages = ["splunklib", | ||
"splunklib.modularinput", | ||
"splunklib.searchcommands"], | ||
|
||
packages=["splunklib", "splunklib.modularinput", "splunklib.searchcommands"], | ||
url="http://github.com/splunk/splunk-sdk-python", | ||
|
||
version=splunklib.__version__, | ||
|
||
classifiers = [ | ||
classifiers=[ | ||
"Programming Language :: Python", | ||
"Development Status :: 6 - Mature", | ||
"Environment :: Other Environment", | ||
|
@@ -156,4 +153,6 @@ def run(self): | |
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Software Development :: Libraries :: Application Frameworks", | ||
], | ||
install_requires=["deprecation"], | ||
readme=open("README.md").read(), | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,6 @@ deps = pytest | |
xmlrunner | ||
unittest-xml-reporting | ||
python-dotenv | ||
deprecation | ||
|
||
distdir = build | ||
commands = | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.