Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 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)