Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
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
django
Commits
5338ff48
Kaydet (Commit)
5338ff48
authored
Ock 16, 2015
tarafından
Collin Anderson
Kaydeden (comit)
Tim Graham
Ock 16, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #24160 -- Fixed model_regress test on Windows; refs #24007.
üst
726a9550
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
test_pickle.py
tests/model_regress/test_pickle.py
+9
-9
No files found.
tests/model_regress/test_pickle.py
Dosyayı görüntüle @
5338ff48
...
@@ -83,16 +83,16 @@ print(article.headline)"""
...
@@ -83,16 +83,16 @@ print(article.headline)"""
with
NamedTemporaryFile
(
mode
=
'w+'
,
suffix
=
".py"
,
dir
=
'.'
)
as
script
:
with
NamedTemporaryFile
(
mode
=
'w+'
,
suffix
=
".py"
,
dir
=
'.'
)
as
script
:
script
.
write
(
script_template
%
pickle
.
dumps
(
a
))
script
.
write
(
script_template
%
pickle
.
dumps
(
a
))
script
.
flush
()
script
.
flush
()
env
=
{
# Needed to run test outside of tests directory
str
(
'PYTHONPATH'
):
os
.
pathsep
.
join
(
sys
.
path
),
# Needed on Windows because http://bugs.python.org/issue8557
str
(
'PATH'
):
os
.
environ
[
'PATH'
],
}
if
'SYSTEMROOT'
in
os
.
environ
:
# Windows http://bugs.python.org/issue20614
env
[
str
(
'SYSTEMROOT'
)]
=
os
.
environ
[
'SYSTEMROOT'
]
try
:
try
:
result
=
subprocess
.
check_output
(
result
=
subprocess
.
check_output
([
sys
.
executable
,
script
.
name
],
env
=
env
)
[
sys
.
executable
,
script
.
name
],
env
=
{
# Needed to run test outside of tests directory
str
(
'PYTHONPATH'
):
os
.
pathsep
.
join
(
sys
.
path
),
# Needed on Windows because http://bugs.python.org/issue8557
str
(
'PATH'
):
os
.
environ
[
'PATH'
],
}
)
except
subprocess
.
CalledProcessError
:
except
subprocess
.
CalledProcessError
:
self
.
fail
(
"Unable to reload model pickled data"
)
self
.
fail
(
"Unable to reload model pickled data"
)
self
.
assertEqual
(
result
.
strip
()
.
decode
(),
"Some object"
)
self
.
assertEqual
(
result
.
strip
()
.
decode
(),
"Some object"
)
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