Module Expr Str ImportFrom alias alias alias alias Import alias FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad NameLoad Assign NameStore BoolOpOr NameLoad NameLoad Assert CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call NameLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assert CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assert CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assert CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str Expr Call NameLoad Str Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str Str Str decorator_list
N/A N/A test_jiphy.py.

Tests all major functionality of the jiphy library
Should be ran using py.test by simply running by.test in the jiphy project directory

Copyright (C) 2013  Timothy Edmund Crosley

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

 __future__ absolute_import division print_function unicode_literals N/A jiphy two_way_conversion_test N/A N/A python_code javascript_code expect_python expect_javascript N/A None None N/A N/A Tests that the given Python_code will turn into the specified JavaScript and visa versa in a Jiphy.
       Additionaly, ensures that if the python code is passed into the python converter it stays as Python
       and if the given JavaScript code is passed into the javascript converter they get return unmodified
     N/A expect_javascript N/A expect_javascript javascript_code N/A expect_python N/A expect_python python_code N/A N/A N/A N/A N/A jiphy to javascript python_code expect_javascript N/A N/A print N/A repr N/A N/A N/A jiphy to python javascript_code N/A N/A N/A N/A N/A jiphy to python javascript_code expect_python N/A N/A N/A N/A N/A jiphy to javascript javascript_code javascript_code N/A N/A N/A N/A N/A jiphy to python python_code python_code N/A test_import_conversion N/A N/A N/A N/A N/A Tests to ensure that converting Python imports to JavaScript imports and vice versa works in a Jiphy. N/A N/A two_way_conversion_test import something
import underscore as _
 var something = require('something');
var _ = require('underscore');
 var something = require('something')
var _ = require('underscore')
 N/A test_noop_function_conversion N/A N/A N/A N/A N/A Tests to ensure that converting Javascript require statements to Python imports works in a Jiphy. N/A N/A two_way_conversion_test def my_function(): pass
 function my_function() {}
 N/A test_simple_indented_function_conversion N/A N/A N/A N/A N/A Tests to ensure that converting Javascript require statements to Python imports works in a Jiphy. N/A N/A two_way_conversion_test def my_function(test):
    some_other_function(test)

 function my_function(test) {
    some_other_function(test);
}
 N/A test_print_statement N/A N/A N/A N/A N/A Tests to ensure print statements have a simple convesion applied to them N/A N/A two_way_conversion_test print('something')
 console.log('something');
 N/A boolean_test N/A N/A N/A N/A N/A Tests to ensure boolean statements have a simple convesion applied to them in a jiphy N/A N/A two_way_conversion_test a = (True and False) or (None and Unset)
 a = (true && false) or (null and undefined);
 N/A test_condition N/A N/A N/A N/A N/A Test to ensure basic while loop gets converted in a jiphy N/A N/A two_way_conversion_test if something is True:
    do_something()

 if (something === true) {
    do_something();
}
 N/A test_while_loop N/A N/A N/A N/A N/A Test to ensure basic conditionals get converted in a jiphy N/A N/A two_way_conversion_test while something is True:
    do_something()

 while (something === true) {
    do_something();
}
 N/A test_is N/A N/A N/A N/A N/A Test to ensure === gets changed to is in a jiphy N/A N/A two_way_conversion_test True is True
 true === true;
 N/A test_not N/A N/A N/A N/A N/A Test to nesure not statements are correct handled in a jiphy N/A N/A two_way_conversion_test True is not True
True = not True
 true !== true;
true = !true;
 N/A test_for_loop N/A N/A N/A N/A N/A Test to ensure that for loops will convert correctly N/A N/A two_way_conversion_test for var x = 0; x < 10; x++:
    var y = x

 for (var x = 0; x < 10; x++) {
    var y = x;
}
 N/A test_variables N/A N/A N/A N/A N/A Test to ensure that vars will be correctly handled N/A N/A two_way_conversion_test var x = 10
 var x = 10;
 N/A test_delete N/A N/A N/A N/A N/A Test to ensure deletion works as expected N/A N/A two_way_conversion_test del x
 delete x;
 N/A test_elif N/A N/A N/A N/A N/A Test to ensure elif works as expected N/A N/A two_way_conversion_test if x == y:
    print('one')
elif True:
    print('two')

 if (x == y) {
    console.log('one');
} else if (true) {
    console.log('two');
}
 N/A test_pass N/A N/A N/A N/A N/A Test to ensure pass is correctly converted N/A N/A two_way_conversion_test if x:
    pass


 if (x) {
    

}
 N/A test_comments N/A N/A N/A N/A N/A Test to ensure comments will work as expected N/A N/A two_way_conversion_test """Test comment
    line two
"""
 /* Test comment
    line two
 */
 N/A N/A two_way_conversion_test # comment
 // comment
 N/A N/A two_way_conversion_test """"
    Test Comment
"""
 /**
    Test Comment
 */
 N/A test_multi_line_string N/A N/A N/A N/A N/A Test to ensure multi line strings work as expected N/A N/A two_way_conversion_test print('''line one
         line two''')
 console.log('line one\n' +
'         line two');
 print('line one\n' +
'         line two')
 N/A test_assigned_function N/A N/A N/A N/A N/A Test to ensure assigning a function works as expected N/A N/A two_way_conversion_test exports.schema = def(argument1, argument2):
  print(argument1)

 exports.schema = function(argument1, argument2) {
  console.log(argument1);
};
 N/A N/A two_way_conversion_test exports.schema = def(argument1, argument2):
  print(argument1)

 exports.schema = function(argument1, argument2) {
  console.log(argument1);
};
 N/A test_magic_function N/A N/A N/A N/A N/A Test to ensure assigning a function works as expected N/A N/A two_way_conversion_test =def schema(argument1, argument2):
  print(argument1)

 module.exports.schema = function(argument1, argument2) {
  console.log(argument1);
};
 module.exports.schema = def(argument1, argument2):
  print(argument1)

 N/A test_decorator N/A N/A N/A N/A N/A Test to ensure decorators get converted in the expected way N/A N/A two_way_conversion_test @decorate
def my_action(arguments):
   do_something()

 my_action = decorate(my_action);
function my_action(arguments) {
   do_something();
}
 my_action = decorate(my_action)
def my_action(arguments):
   do_something()

 N/A test_str N/A N/A N/A N/A N/A Test to ensure strings get converted in the expected way N/A N/A two_way_conversion_test x = str(1)
 x = String(1);
 N/A test_int N/A N/A N/A N/A N/A Test to ensure ints get converted in the expected way N/A N/A two_way_conversion_test y = int('1')
 y = Number('1');
 N/A test_bool N/A N/A N/A N/A N/A Test to ensure booleans get converted in the expected way N/A N/A two_way_conversion_test z = bool(1)
 z = Boolean(1);
 N/A test_breakpoint N/A N/A N/A N/A N/A Test to ensure breakpoints get converted in the expected way N/A N/A two_way_conversion_test import pdb; pdb.set_trace()
 debugger;
 N/A test_last_construct_single_line_comment N/A N/A N/A N/A N/A Test to ensure correct behaviour when the last construct is a single line comment N/A N/A two_way_conversion_test def my_utility(argument):
   do_something()
   # comment

 function my_utility(argument) {
   do_something();
   // comment
}
 N/A test_except_conversion N/A N/A N/A N/A N/A Test to ensure excepts / catches get converted successfully N/A N/A two_way_conversion_test try:
   do_something()
except Exception as e:
   do_something_else(e)

 try {
   do_something();
} catch (e) {
   do_something_else(e);
}
 N/A N/A two_way_conversion_test try:
   do_something()
except:
   do_something_else()

 try {
   do_something();
} catch () {
   do_something_else();
}
 N/A test_append_conversion N/A N/A N/A N/A N/A Tests to ensure append/push get converted in desired mannor N/A N/A two_way_conversion_test [].append('item')
 [].push('item');
 N/A test_raise_conversion N/A N/A N/A N/A N/A Tests to ensure append/push get converted in desired mannor N/A N/A two_way_conversion_test raise 'error'
 throw 'error';
 N/A test_for_loop_in_function_conversion N/A N/A N/A N/A N/A Tests to ensure a for loop within a function gets converted as expected N/A N/A two_way_conversion_test def clear():
    grid = []
    for i in range(0, config.SIZE):
        grid.append(0)




 function clear() {
    grid = [];
    for (i in range(0, config.SIZE)) {
        grid.push(0);
    }
}


 def clear():
    grid = []
    for i in range(0, config.SIZE):
        grid.append(0)
    



 N/A