#!/usr/bin/env python
import numpy as np

from pych.extern import Chapel

@Chapel()
def printArray(arr=np.ndarray):
    """
    arr += 1;
    writeln(arr);
    """
    return None

if __name__ == "__main__":
    arr = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0])
    print arr
    printArray(arr);
    print arr

import testcase
# contains the general testing method, which allows us to gather output
import os.path

def test_modify_array_argument_reals():
    out = testcase.runpy(os.path.realpath(__file__))
    # The first time this test is run, it may contain output notifying that
    # a temporary file has been created. The important part is that this
    # expected output follows it (enabling the test to work for all runs, as
    # the temporary file message won't occur in the second run) But that means
    # we can't use ==
    assert out.endswith("[  2.   3.   4.   5.   6.   7.   8.   9.  10.  11.]\n");

#!/usr/bin/env python
import numpy as np

from pych.extern import Chapel

@Chapel()
def printArray(arr=np.ndarray):
    """
    arr += 1;
    writeln(arr);
    """
    return None

if __name__ == "__main__":
    arr = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0])
    print arr
    printArray(arr);
    print arr

import testcase
# contains the general testing method, which allows us to gather output
import os.path

def test_modify_array_argument_reals():
    out = testcase.runpy(os.path.realpath(__file__))
    # The first time this test is run, it may contain output notifying that
    # a temporary file has been created. The important part is that this
    # expected output follows it (enabling the test to work for all runs, as
    # the temporary file message won't occur in the second run) But that means
    # we can't use ==
    assert out.endswith("[ 2.  3.  4.  5.  6.  7.  8.  9. 10. 11.]\n");

Fix trivial unit test error that started when numpy version changed
Fix trivial unit test error that started when numpy version changed

The version of numpy brought in by pip changed, which changed some
test outputs in meaningless ways (ie, spaces), and
those meaningless changes broke a unit test with
    assertEquals( "string literal", test(something) )

This change fixes the unit test error, without at all addressing
the underlying issue (hyper-sensitive string comparison).
