garybernhardt / mote Goto Github PK
View Code? Open in Web Editor NEWA very experimental spec runner for Python. Beware: it is incomplete and may change drastically.
A very experimental spec runner for Python. Beware: it is incomplete and may change drastically.
Imported from BitBucket:
Reported by Brian Beck / exogen, created about a year ago.
Perhaps Dingus can be imported lazily and declared as an optional dependency using setuptools' extras_require option.
Imported from BitBucket:
If you accidentally add a "self" argument to a spec function, Mote does something like this:
Traceback (most recent call last):
File "/Users/grb/proj/expecter_gadget/env/bin/mote", line 8, in <module>
load_entry_point('mote==0.1', 'console_scripts', 'mote')()
File "/Users/grb/proj/mote/repo-rewrite/mote/runner.py", line 24, in main
suite = SpecSuite(modules)
File "/Users/grb/proj/mote/repo-rewrite/mote/suite.py", line 13, in __init__
for ctx in self._contexts_from_module(module_contents.values())]
File "/Users/grb/proj/mote/repo-rewrite/mote/suite.py", line 20, in _contexts_from_module
and value.__name__.startswith('describe_')]
File "/Users/grb/proj/mote/repo-rewrite/mote/suite.py", line 30, in __init__
self.children = self._collect_children()
File "/Users/grb/proj/mote/repo-rewrite/mote/suite.py", line 86, in _collect_children
return [Context(function, self) for function in local_functions]
File "/Users/grb/proj/mote/repo-rewrite/mote/suite.py", line 30, in __init__
self.children = self._collect_children()
File "/Users/grb/proj/mote/repo-rewrite/mote/suite.py", line 86, in _collect_children
return [Context(function, self) for function in local_functions]
File "/Users/grb/proj/mote/repo-rewrite/mote/suite.py", line 30, in __init__
self.children = self._collect_children()
File "/Users/grb/proj/mote/repo-rewrite/mote/suite.py", line 81, in _collect_children
self.failure = Failure(sys.exc_info())
File "/Users/grb/proj/mote/repo-rewrite/mote/suite.py", line 92, in __init__
self.exc_traceback = self._remove_mote_from_traceback(exc_traceback)
File "/Users/grb/proj/mote/repo-rewrite/mote/suite.py", line 106, in _remove_mote_from_traceback
frame = traceback.tb_frame
AttributeError: 'NoneType' object has no attribute 'tb_frame'
Imported from BitBucket:
Reported by Brian Beck / exogen, created about a year ago.
This is probably due to the combination of tests/init.py and an over-inclusive find_packages() in setup.py.
Imported from BitBucket:
Reported by Gary Bernhardt / garybernhardt, created 9 months ago.
When running this spec:
def describe_integer():
def describe_when_adding_one_and_one():
x = 1 + 1
def should_get_two():
assert x == 2
def raises_error_when_dividing_by_zero():
with expect.raises(ZeroDivisionError):
1 / 0
you get the following incorrect output:
integer
integer when adding one and one
- should get two
- raises error when dividing by zero
OK
Imported from BitBucket:
Reported by Gary Bernhardt / garybernhardt, created 9 months ago.
This is especially nefarious in a for loop. If you say: for my_lambda in some_lambdas: ...do stuff
then the last my_lambda will be left around after the loop ends. Mote will find it and try to run it as a spec.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.