소스 검색

Update copyright and email

add windows testing with appveyor
Oz N Tiram 8 년 전
부모
커밋
2bf9489ba3
3개의 변경된 파일54개의 추가작업 그리고 9개의 파일을 삭제
  1. 7 7
      .travis.yml
  2. 45 0
      appveyor.yml
  3. 2 2
      pwman/ui/tools.py

+ 7 - 7
.travis.yml

@@ -1,6 +1,6 @@
 language: python
 python:
-  - 3.4 
+  - 3.4
   - 3.5
 
 services:
@@ -10,7 +10,7 @@ before_script:
   - psql -c "CREATE USER tester WITH PASSWORD '123456';" -U postgres
   - psql -c 'create database pwman;' -U postgres
   - psql -c 'grant ALL ON DATABASE pwman to tester' -U postgres
-  - mysql -e 'create database pwmantest' -uroot 
+  - mysql -e 'create database pwmantest' -uroot
   - mysql -e "create user 'pwman'@'localhost' IDENTIFIED BY '123456'" -uroot
   - mysql -e "grant all on pwmantest.* to 'pwman'@'localhost';" -uroot
   - mongo pwmantest --eval 'db.addUser("tester", "12345678");'
@@ -20,15 +20,15 @@ before_install:
   - sudo apt-get install python-psycopg2 python3-psycopg2
   - sudo apt-get install python-mysqldb
 # command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
-install: 
-  - "pip install pymongo==2.8"  
-  - "pip install pymysql"   
+install:
+  - "pip install pymongo==2.8"
+  - "pip install pymysql"
   - "pip install -r requirements.txt -r test_requirements.txt"
   - "pip install coveralls"
   - "pip install ."
 # command to run tests, e.g. python setup.py test
-script:  
+script:
   python setup.py develop && coverage run --source=pwman setup.py test
-    
+
 after_success:
   coveralls

+ 45 - 0
appveyor.yml

@@ -0,0 +1,45 @@
+build: false
+services:
+  - postgresql
+  - mongodb
+  - mysql
+
+environment:
+  matrix:
+    - PYTHON: "C:/Python34"
+    - PYTHON: "C:/Python35"
+    - PYTHON: "C:/Python36"
+
+  # postgres
+  POSTGRES_PATH: C:\Program Files\PostgreSQL\9.4
+  PGUSER: postgres
+  PGPASSWORD: Password12!
+
+  MYSQL_ENV_MYSQL_USER: root
+  MYSQL_ENV_MYSQL_PASSWORD: Password12!
+  MYSQL_ENV_MYSQL_DATABASE: sqlectron
+  MYSQL_PATH: C:\Program Files\MySql\MySQL Server 5.7
+  MYSQL_PWD: Password12!
+  MONGOPATH: C:/mongodb
+
+init:
+  - "ECHO %PYTHON%"
+  - ps: "ls C:/Python*"
+  - SET PATH=%MONGOPATH\bin%;%MYSQL_PATH\bin%;%POSTGRES_PATH%\bin;%MYSQL_PATH%\bin;%PATH%
+
+install:
+  - "%PYTHON%/Scripts/pip.exe install -e ."
+  - "%PYTHON%/Scripts/pip.exe install -r test_requirements.txt"
+  - "%PYTHON%/Scripts/pip.exe install -r requirements.txt"
+
+test_script:
+  - C:/mongodb/bin/mongo.exe pwmantest --eval "db.createUser({user: \"tester\", pwd: \"12345678\"});"
+  - psql -c "CREATE USER tester WITH PASSWORD '123456';"
+  - psql -c "create database pwman"
+  - psql -c "grant ALL ON DATABASE pwman to tester"
+  - mysql -e "create database pwmantest" -uroot
+  - mysql -e "create user 'pwman'@'localhost' IDENTIFIED BY '123456'" -uroot
+  - mysql -e "grant all on pwmantest.* to 'pwman'@'localhost';" -uroot
+  - "%PYTHON%/Scripts/pip.exe --version"
+  - "%PYTHON%/python.exe setup.py test"
+

+ 2 - 2
pwman/ui/tools.py

@@ -14,12 +14,12 @@
 # along with Pwman3; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 # ============================================================================
-# Copyright (C) 2013 Oz Nahum <nahumoz@gmail.com>
+# Copyright (C) 2017 Oz Nahum Tiram <oz.tiram@gmail.com>
 # ============================================================================
 """
 Define the CLI interface for pwman3 and the helper functions
 """
-from __future__ import print_function
+
 import subprocess as sp
 import getpass
 import sys