hy/tests
Kodi Arfer e4a7b317e1 Make fn work like lambda and remove lambda (#1228)
* with-decorator: Allow a `setv` form as the form to be decorated

This feature is of dubious value by itself, but it's necessary to allow `defn` to create a lambda instead of a `def`.

* Make `fn` work the same as `lambda`

That is, allow it to generate a `lambda` instead of a `def` statement if the function body is just an expression.

I've removed two uses of with_decorator in hy.compiler because they'd require adding another case to HyASTCompiler.compile_decorate_expression and they have no ultimate effect, anyway.

In a few tests, I've added a meaningless statement in `fn` bodies to force generation of a `def`.

I've removed `test_fn_compiler_empty_function` rather than rewrite it because it seems like a pain to maintain and not very useful.

* Remove `lambda`, now that `fn` does the same thing
2017-02-22 17:36:52 -06:00
..
compilers Make fn work like lambda and remove lambda (#1228) 2017-02-22 17:36:52 -06:00
importer Make fn work like lambda and remove lambda (#1228) 2017-02-22 17:36:52 -06:00
lex Consolidate hy.models.* and tests/models/* into one file apiece 2017-02-16 19:43:00 -08:00
macros Consolidate hy.models.* and tests/models/* into one file apiece 2017-02-16 19:43:00 -08:00
native_tests Make fn work like lambda and remove lambda (#1228) 2017-02-22 17:36:52 -06:00
resources Give require the same features as import (#1142) 2016-11-03 09:35:58 +02:00
test_files Run file using hy -i 2015-02-28 18:11:42 +10:00
__init__.py Remove contrib.meth 2016-12-29 08:35:54 -08:00
test_bin.py Run file using hy -i 2015-02-28 18:11:42 +10:00
test_models.py Consolidate hy.models.* and tests/models/* into one file apiece 2017-02-16 19:43:00 -08:00