def test_parsels(self): fLOG( __file__, self._testMethodName, OutputPrint=__name__ == "__main__") out = """Found 6 items drwx------ - xavierdupre xavierdupre 0 2014-11-18 01:00 .Trash drwx------ - xavierdupre xavierdupre 0 2014-11-16 02:38 .staging -rw-r--r-- 3 xavierdupre xavierdupre 129.6 K 2014-11-16 02:37 ConfLongDemo_JSI.small.example.txt drwxr-xr-x - xavierdupre xavierdupre 0 2014-11-16 02:38 ConfLongDemo_JSI.small.example2.walking.txt -rw-r--r-- 3 xavierdupre xavierdupre 450.6 K 2014-11-20 01:33 paris.2014-11-11_22-00-18.331391.txt drwxr-xr-x - xavierdupre xavierdupre 0 2014-11-20 01:53 velib_1hjs""".replace(" ", "") fLOG(out) for _ in out.split("\n"): __ = _.split() fLOG(len(__), __) parse = ASSHClient.parse_lsout(out) fLOG(parse.columns) assert list( parse.columns) == [ 'attributes', 'code', 'alias', 'folder', 'size', 'unit', 'name', 'isdir'] assert len(parse) > 0
def test_ls(self): fLOG(__file__, self._testMethodName, OutputPrint=__name__ == "__main__") line = "-rw-rw-r-- 1 xavierdupre xavierdupre 21546346 Sep 27 11:18 ConfLongDemo_JSI.txt" out = ASSHClient.parse_lsout(line, False) self.assertEqual(out.shape, (1, 9)) fLOG(out) fLOG(out.columns)
def test_ls(self): fLOG( __file__, self._testMethodName, OutputPrint=__name__ == "__main__") line = "-rw-rw-r-- 1 xavierdupre xavierdupre 21546346 Sep 27 11:18 ConfLongDemo_JSI.txt" out = ASSHClient.parse_lsout(line, False) self.assertEqual(out.shape, (1, 9)) fLOG(out) fLOG(out.columns)
def test_parsels(self): fLOG(__file__, self._testMethodName, OutputPrint=__name__ == "__main__") out = """Found 6 items drwx------ - xavierdupre xavierdupre 0 2014-11-18 01:00 .Trash drwx------ - xavierdupre xavierdupre 0 2014-11-16 02:38 .staging -rw-r--r-- 3 xavierdupre xavierdupre 129.6 K 2014-11-16 02:37 ConfLongDemo_JSI.small.example.txt drwxr-xr-x - xavierdupre xavierdupre 0 2014-11-16 02:38 ConfLongDemo_JSI.small.example2.walking.txt -rw-r--r-- 3 xavierdupre xavierdupre 450.6 K 2014-11-20 01:33 paris.2014-11-11_22-00-18.331391.txt drwxr-xr-x - xavierdupre xavierdupre 0 2014-11-20 01:53 velib_1hjs""".replace( " ", "") fLOG(out) for _ in out.split("\n"): __ = _.split() fLOG(len(__), __) parse = ASSHClient.parse_lsout(out) fLOG(parse.columns) assert list(parse.columns) == [ 'attributes', 'code', 'alias', 'folder', 'size', 'unit', 'name', 'isdir' ] assert len(parse) > 0