0
我在運行python單元測試文件後遇到問題。一旦文件退出,我只能按「i」並使用其他vim鍵綁定後才能與控制檯交互。我還注意到,使用箭頭鍵遍歷我輸入的內容將刪除行尾的隨機數字。運行python文件後,運行在bash中的Vim命令
EX:
$ ./tests.py -v
<output>
$ <cannot type>
<press "i">
$ I can now type
<press <- >
$ I can no
我使用RHEL 7和bash。我嘗試過使用Google搜索這個問題,但我要麼不好的格式化這個問題,要麼這是一個不常見的問題。
謝謝你的幫助。
編輯:
實際test.py包含私有代碼,但是這是示例包含相同的基本代碼。
test.py
#!/usr/bin/env python
import unittest
class TestUtil(unittest.TestCase):
def test_hello_world(self):
text = "Hello World!"
self.assertEqual("Hello World!", text)
print(text)
pass
if __name__ == '__main__':
unittest.main()
什麼呢tests.py樣子 – depperm
上面添加,我真的不能顯示真正的test.py但本質上我將創建變量,運行命令與ansible接口,打印輸出並通過。 –
@DanLowe這是我的問題!如果您想將您的評論置於答案中,我會將其標記爲正確! –