Commits

Ronny Pfannschmidt  committed 605b150

test command for setup.py and kill bzr package

  • Participants
  • Parent commits 8fb0da7

Comments (0)

Files changed (3)

File anyvc/subversion/repo.py

 from anyvc.common.commit_builder import CommitBuilder
 from subvertpy.properties import time_from_cstring, time_to_cstring
 from StringIO import StringIO
-from ..exc import NotFoundError
 
 
 from datetime import datetime
             #XXX: subversion cant set a commit date on commit, sucker
             #'svn:date':time_to_cstring(self.time_unix*1000000),
             })
-        print self.time
+
         root = editor.open_root()
 
         for src, target in self.renames:
         for file in self.contents:
             try:
                 svnfile = root.add_file(file)
-            except:
+            except Exception as e:
                 svnfile = root.open_file(file)
             txhandler = svnfile.apply_textdelta()
             f = StringIO(self.contents[file])

File anyvc/util.py

     try:
         res = urllib.urlopen(path)
         return res.code, res.read()
-    except Exception, e: # diaper
-        logging.error('no data for path %s', path)
+    except Exception as e: # diaper
+        logging.error('no data for path %s, error %s', path, e)
         return -1, ''
 
 
 from __future__ import with_statement
 from setuptools import setup
 
+
+
+from setuptools.command.test import test
+
+class pytest(test):
+    def finalize_options(self):
+        test.finalize_options(self)
+        self.test_args = []
+        self.test_suite = True
+    def run_tests(self):
+        import pytest
+        pytest.main([])
+
+
 def read_readme():
     with open('docs/readme.rst') as f:
         return f.read()
         'anyvc.mercurial',
         'anyvc.git',
         'anyvc.subversion',
-        'anyvc.bazaar',
     ],
     setup_requires=[
         'hgdistver',
     classifiers=[
         'Intended Audience :: Developers',
     ],
+    cmdclass = {'test': pytest}
 )