Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix appveyor (for mssql testing) #722

Merged
merged 1 commit into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
pyDAL changelog
===============
TEST2

Version 18.0
------------

Released on December 27th 2019

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pyDAL test 3
# pyDAL

[![pip version](https://img.shields.io/pypi/v/pydal.svg?style=flat-square)](https://pypi.python.org/pypi/pydal)
[![master-test](https://github.com/web2py/pydal/actions/workflows/run_test.yaml/badge.svg)](https://github.com/web2py/pydal/actions/workflows/run_test.yaml)
Expand All @@ -12,7 +12,7 @@ What makes pyDAL different from most of the other DALs is the syntax: it maps re

Historically pyDAL comes from the original web2py's DAL, with the aim of being compatible with any Python program. However, pyDAL nowadays is an indipendent package that can be used in any Python 3.7+ context.

## Installation test
## Installation

You can install pyDAL using `pip`:

Expand Down
12 changes: 8 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
build: false
image: Visual Studio 2019

services:
- mssql2014
- mssql2019

environment:
matrix:
Expand All @@ -19,23 +20,26 @@ clone_depth: 50
init:
- "ECHO %PYTHON%"
- set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
- powershell -Command "Get-Service | Where-Object { $_.DisplayName -like '*SQL*' }"
- ps: Start-Service -Name 'MSSQL$SQL2019' -ErrorAction SilentlyContinue


install:
- appveyor DownloadFile https://bootstrap.pypa.io/pip/get-pip.py
- python get-pip.py
- pip install tox==1.9.2
- pip install tox==4.23.2
- pip install codecov

before_test:
- ps: |
while($LASTEXITCODE -ne 0)
{
& sqlcmd -S "(local)\SQL2014" -b -U "sa" -P "Password12!" -Q "CREATE DATABASE pydal COLLATE Latin1_General_CS_AS;" -d "master"
& sqlcmd -S "(local)" -U "sa" -P "Password12!" -Q "CREATE DATABASE pydal COLLATE Latin1_General_CS_AS;" -d "master"
sleep 10; $val++; Write-Host Waiting ... $val; if($val -ge 10) {break}
}

test_script:
- tox -e coverage-%adapter%

after_test:
- codecov
- codecov
3 changes: 2 additions & 1 deletion tests/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ def testMethods(self):
self.assertIsInstance(sub.on(sub.aa != None), Expression)

@skipIf(PY2, "sqlite3 on py2 does not allow circular references")
@unittest.skipIf(IS_MSSQL, "Skip mssql")
def testCTE(self):
db = self.connect()
db.define_table("org", Field("name"), Field("boss", "reference org"))
Expand Down Expand Up @@ -3714,4 +3715,4 @@ def testMultiSelectWithCommit(self):

if __name__ == "__main__":
unittest.main()
tearDownModule()
tearDownModule()
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ envlist = {py38,py310}-{sqlite,mongo,mysql,oracle}, {py38,py310}-{postgres,postg
skipsdist = True

[testenv]
passenv = ORACLE_HOME ORACLE_BASE LD_LIBRARY_PATH NLS_LANG ORACLE_SID
passenv = ORACLE_HOME,ORACLE_BASE,LD_LIBRARY_PATH,NLS_LANG,ORACLE_SID
setenv =
sqlite: DB=sqlite:///tmp/storage.sqlite
mysql: DB=mysql://root:@localhost/pydal
postgres: DB=postgres://postgres:@localhost/pydal
postgres3: DB=postgres3:psycopg2://postgres:@localhost/pydal
google: DB=google:datastore
mongo: DB=mongodb://localhost/pydal
mssql: DB=mssql4://sa:Password12!@(local)\SQL2014/pydal
mssqln: DB=mssql4n://sa:Password12!@(local)\SQL2014/pydal
mssql: DB=mssql4://sa:Password12!@(local)\SQL2019/pydal
mssqln: DB=mssql4n://sa:Password12!@(local)\SQL2019/pydal
oracle: DB=oracle://TEST/TEST@XE
deps =
mysql: pymysql
Expand All @@ -28,4 +28,4 @@ commands =
py38,py10: {envpython} -m unittest -v -f tests
coverage: coverage erase
coverage: coverage run -m unittest -v -f tests
coverage: coverage combine
coverage: coverage combine