Giter Club home page Giter Club logo

mote's People

Contributors

exogen avatar garybernhardt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mote's Issues

mote depends on Dingus

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.

Mote explodes when spec functions take arguments

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'

Spec output is sometimes in wrong order

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

Local lambdas get run as specs

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.