OILS / pylib / path_stat_test.py View on Github | oilshell.org

24 lines, 12 significant
1#!/usr/bin/env python2
2"""
3path_stat_test.py: Tests for path_stat.py
4"""
5from __future__ import print_function
6
7import unittest
8
9from pylib import path_stat # module under test
10
11
12class PathStatTest(unittest.TestCase):
13
14 def testPathExists(self):
15 self.assertEqual(True, path_stat.exists('/'))
16 self.assertEqual(False, path_stat.exists('/nonexistent__ZZZZ'))
17
18 def testIsDir(self):
19 self.assertEqual(True, path_stat.exists('/'))
20 self.assertEqual(False, path_stat.exists('/nonexistent__ZZZZ'))
21
22
23if __name__ == '__main__':
24 unittest.main()