Commits

Miki Tebeka committed a131a81

Conventional testing :)

  • Participants
  • Parent commits 6b403f0

Comments (0)

Files changed (5)

 build
 dist
 whoops.egg-info
+*-*.egg
         'Topic :: Software Development :: Libraries :: Python Modules',
     ],
     install_requires=['requests'],
+    test_suite='nose.collector',
+    tests_require=['nose'],
 )

File t

-#!/usr/bin/env python
-
-
-from whoops import WebHDFS
-
-conn = WebHDFS('cdh4', user='hdfs')
-remote = '/tmp/z138'
-new = '/tmp/8z'
-print('put')
-conn.put('README.rst', remote, overwrite=True)
-print('listdir')
-print(conn.listdir('/tmp'))
-print('stat')
-print(conn.stat(remote))
-print('checksum')
-print(conn.checksum(remote))
-print('home')
-print(conn.home())
-print('chmod')
-conn.chmod(0o777, remote)
-print('chown')
-conn.chown(remote, 'cloudera')
-print('open')
-print(conn.read(remote).decode('utf-8'))
-print('append')
-conn.append(__file__, remote)
-print('mkdir')
-print(conn.mkdir('/tmp/zolo'))
-print('rename')
-print(conn.rename(remote, new))
-print('delete')
-print(conn.delete(new))

File whoops/__init__.py

File contents unchanged.

File whoops/tests/test_api.py

+from whoops import WebHDFS
+
+def test_api():
+    conn = WebHDFS('cdh4', user='hdfs')
+    remote = '/tmp/z138'
+    new = '/tmp/8z'
+    print('put')
+    conn.put('README.rst', remote, overwrite=True)
+    print('listdir')
+    print(conn.listdir('/tmp'))
+    print('stat')
+    print(conn.stat(remote))
+    print('checksum')
+    print(conn.checksum(remote))
+    print('home')
+    print(conn.home())
+    print('chmod')
+    conn.chmod(0o777, remote)
+    print('chown')
+    conn.chown(remote, 'cloudera')
+    print('open')
+    print(conn.read(remote).decode('utf-8'))
+    print('append')
+    conn.append(__file__, remote)
+    print('mkdir')
+    print(conn.mkdir('/tmp/zolo'))
+    print('rename')
+    print(conn.rename(remote, new))
+    print('delete')
+    print(conn.delete(new))