Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
357be7cc
Kaydet (Commit)
357be7cc
authored
Haz 14, 2016
tarafından
Berker Peksag
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge from 3.5
üst
7fb468bf
f85bce74
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
16 deletions
+9
-16
dbapi.py
Lib/sqlite3/test/dbapi.py
+2
-2
regression.py
Lib/sqlite3/test/regression.py
+1
-2
transactions.py
Lib/sqlite3/test/transactions.py
+4
-8
types.py
Lib/sqlite3/test/types.py
+2
-4
No files found.
Lib/sqlite3/test/dbapi.py
Dosyayı görüntüle @
357be7cc
...
...
@@ -177,9 +177,9 @@ class ConnectionTests(unittest.TestCase):
with
self
.
assertRaises
(
sqlite
.
OperationalError
):
cx
.
execute
(
'insert into test(id) values(1)'
)
@unittest.skipIf
(
sqlite
.
sqlite_version_info
>=
(
3
,
3
,
1
),
'needs sqlite versions older than 3.3.1'
)
def
CheckSameThreadErrorOnOldVersion
(
self
):
if
sqlite
.
sqlite_version_info
>=
(
3
,
3
,
1
):
self
.
skipTest
(
'test needs sqlite3 versions older than 3.3.1'
)
with
self
.
assertRaises
(
sqlite
.
NotSupportedError
)
as
cm
:
sqlite
.
connect
(
':memory:'
,
check_same_thread
=
False
)
self
.
assertEqual
(
str
(
cm
.
exception
),
'shared connections not available'
)
...
...
Lib/sqlite3/test/regression.py
Dosyayı görüntüle @
357be7cc
...
...
@@ -84,9 +84,8 @@ class RegressionTests(unittest.TestCase):
cur
.
execute
(
"select 1 x union select "
+
str
(
i
))
con
.
close
()
@unittest.skipIf
(
sqlite
.
sqlite_version_info
<
(
3
,
2
,
2
),
'needs sqlite 3.2.2 or newer'
)
def
CheckOnConflictRollback
(
self
):
if
sqlite
.
sqlite_version_info
<
(
3
,
2
,
2
):
return
con
=
sqlite
.
connect
(
":memory:"
)
con
.
execute
(
"create table foo(x, unique(x) on conflict rollback)"
)
con
.
execute
(
"insert into foo(x) values (1)"
)
...
...
Lib/sqlite3/test/transactions.py
Dosyayı görüntüle @
357be7cc
...
...
@@ -111,25 +111,21 @@ class TransactionTests(unittest.TestCase):
res
=
self
.
cur2
.
fetchall
()
self
.
assertEqual
(
len
(
res
),
1
)
@unittest.skipIf
(
sqlite
.
sqlite_version_info
<
(
3
,
2
,
2
),
'test hangs on sqlite versions older than 3.2.2'
)
def
CheckRaiseTimeout
(
self
):
if
sqlite
.
sqlite_version_info
<
(
3
,
2
,
2
):
# This will fail (hang) on earlier versions of sqlite.
# Determine exact version it was fixed. 3.2.1 hangs.
return
self
.
cur1
.
execute
(
"create table test(i)"
)
self
.
cur1
.
execute
(
"insert into test(i) values (5)"
)
with
self
.
assertRaises
(
sqlite
.
OperationalError
):
self
.
cur2
.
execute
(
"insert into test(i) values (5)"
)
@unittest.skipIf
(
sqlite
.
sqlite_version_info
<
(
3
,
2
,
2
),
'test hangs on sqlite versions older than 3.2.2'
)
def
CheckLocking
(
self
):
"""
This tests the improved concurrency with pysqlite 2.3.4. You needed
to roll back con2 before you could commit con1.
"""
if
sqlite
.
sqlite_version_info
<
(
3
,
2
,
2
):
# This will fail (hang) on earlier versions of sqlite.
# Determine exact version it was fixed. 3.2.1 hangs.
return
self
.
cur1
.
execute
(
"create table test(i)"
)
self
.
cur1
.
execute
(
"insert into test(i) values (5)"
)
with
self
.
assertRaises
(
sqlite
.
OperationalError
):
...
...
Lib/sqlite3/test/types.py
Dosyayı görüntüle @
357be7cc
...
...
@@ -340,11 +340,9 @@ class DateTimeTests(unittest.TestCase):
ts2
=
self
.
cur
.
fetchone
()[
0
]
self
.
assertEqual
(
ts
,
ts2
)
@unittest.skipIf
(
sqlite
.
sqlite_version_info
<
(
3
,
1
),
'the date functions are available on 3.1 or later'
)
def
CheckSqlTimestamp
(
self
):
# The date functions are only available in SQLite version 3.1 or later
if
sqlite
.
sqlite_version_info
<
(
3
,
1
):
return
# SQLite's current_timestamp uses UTC time, while datetime.datetime.now() uses local time.
now
=
datetime
.
datetime
.
now
()
self
.
cur
.
execute
(
"insert into test(ts) values (current_timestamp)"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment