def test_load_stdin(self): try: sys.stdin = io.BytesIO(b"testdata") result = emulambda.read_file_to_string('-') assert result == "testdata" except BaseException as e: self.fail("We failed to read standard input.\n%s" % e.message)
def test_load_stdin(self): try: sys.stdin = io.BytesIO(b"testdata") result = emulambda.read_file_to_string("-") assert result == "testdata" except BaseException as e: self.fail("We failed to read standard input.\n%s" % e.message)
def test_load_file(self): try: emulambda.read_file_to_string(__file__) assert True except BaseException as e: self.fail("We failed to read a file.\n%s" % e.message)