Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b04316
commit 6267585
Showing
4 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
parts | ||
bin | ||
var | ||
sdist | ||
develop-eggs | ||
.installed.cfg | ||
lib | ||
lib64 | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
cover | ||
.coverage | ||
.tox | ||
nosetests.xml | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Mrs. Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
*.sublime-project | ||
*.sublime-workspace | ||
|
||
# virtualenv | ||
env | ||
|
||
# SQLite database | ||
*.db | ||
*.sqlite | ||
|
||
# Vagrant | ||
.vagrant | ||
docs/_build/ | ||
|
||
# intellij | ||
*.iml | ||
.idea/ | ||
.noseids | ||
.tddium* | ||
.elasticbeanstalk/ | ||
|
||
# Elastic Beanstalk Files | ||
.elasticbeanstalk/* | ||
!.elasticbeanstalk/*.cfg.yml | ||
!.elasticbeanstalk/*.global.yml | ||
|
||
docker/*.tar | ||
docker/*.txt |
This file contains 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from __future__ import unicode_literals | ||
import sys | ||
import bdb | ||
|
||
|
||
class BugBuzz(bdb.Bdb): | ||
|
||
def interaction(self, frame, traceback=None): | ||
cmd = raw_input('cmd:') | ||
if cmd == 's': | ||
self.set_step() | ||
elif cmd == 'n': | ||
self.set_next(frame) | ||
|
||
def user_call(self, frame, argument_list): | ||
"""This method is called when there is the remote possibility | ||
that we ever need to stop in this function.""" | ||
print 'user_call', frame | ||
self.interaction(frame) | ||
|
||
def user_line(self, frame): | ||
"""This method is called when we stop or break at this line.""" | ||
print 'user_line', frame | ||
self.interaction(frame) | ||
|
||
def user_return(self, frame, return_value): | ||
"""This method is called when a return trap is set here.""" | ||
print 'user_return', frame | ||
|
||
def user_exception(self, frame, exc_info): | ||
exc_type, exc_value, exc_traceback = exc_info | ||
"""This method is called if an exception occurs, | ||
but only if we are to stop at or just below this level.""" | ||
print 'user_exception', frame | ||
|
||
|
||
|
||
def set_trace(): | ||
BugBuzz().set_trace(sys._getframe().f_back) |
This file contains 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
def foo(bar): | ||
print bar | ||
|
||
num = 123 | ||
|
||
print num | ||
import bugbuzz; bugbuzz.set_trace() | ||
#import pdb; pdb.set_trace() | ||
|
||
foo('xxx') | ||
print num * 10 |
This file contains 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from ez_setup import use_setuptools | ||
use_setuptools() | ||
|
||
from setuptools import setup, find_packages | ||
|
||
version = '0.0.0' | ||
try: | ||
import bugbuzz | ||
version = bugbuzz.__version__ | ||
except ImportError: | ||
pass | ||
|
||
|
||
tests_require = [ | ||
'nose', | ||
'nose-cov', | ||
'mock', | ||
'webtest', | ||
'WSGIProxy2', | ||
'requests', | ||
'pytest', | ||
'pytest-cov', | ||
'pytest-xdist', | ||
'pytest-capturelog', | ||
'pytest-mock', | ||
] | ||
|
||
setup( | ||
name='bugbuzz', | ||
version=version, | ||
packages=find_packages(), | ||
install_requires=[ | ||
], | ||
extras_require=dict( | ||
tests=tests_require, | ||
), | ||
tests_require=tests_require, | ||
) |