示例#1
0
文件: test.py 项目: yokuba/emulambda
 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)
示例#2
0
文件: test.py 项目: fugue/emulambda
 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)
示例#3
0
文件: test.py 项目: yokuba/emulambda
 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)
示例#4
0
文件: test.py 项目: fugue/emulambda
 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)