from pych.extern import Chapel

@Chapel(sfile="users.onlyonce.chpl")
def useTwoModules(x=int, y=int):
    return int

if __name__ == "__main__":
    print(useTwoModules(2, 4))

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

def test_using_multiple_modules():
    out = testcase.runpy(os.path.realpath(__file__))
    # Ensure that when a used module is nowhere near the exported function, we
    # get an error message to that effect.
    assert "error: Cannot find module \'M1\'" in out

from pych.extern import Chapel

@Chapel(sfile="users.onlyonce.chpl")
def useTwoModules(x=int, y=int):
    return int

if __name__ == "__main__":
    print(useTwoModules(2, 4))

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

def test_using_multiple_modules():
    out = testcase.runpy(os.path.realpath(__file__))
    # Ensure that when a used module is nowhere near the exported function, we
    # get an error message to that effect.
    assert "error: Cannot find module or enum \'M1\'" in out

Update expected error message in this test
Update expected error message in this test

With the new ability to "use" enums, the error message for failing to find a
module had been updated to indicate that we didn't find a module or an enum,
making this test's expected output fail to match.  Update the expected error
message to reflect this new functionality.
