Skip to content
Snippets Groups Projects
Commit b4be18c23afd authored by ijl's avatar ijl
Browse files

win_python39_amd64

parent 8a8e4a42d063
No related branches found
No related tags found
No related merge requests found
...@@ -152,6 +152,21 @@ ...@@ -152,6 +152,21 @@
- checkout: self - checkout: self
- template: ./azure-posix.yml - template: ./azure-posix.yml
- job: win_python39_amd64
pool:
vmImage: windows-2019
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.9.0\x64\python.exe
target: x86_64-pc-windows-msvc
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
addToPath: true
architecture: 'x64'
- checkout: self
- template: ./azure-win.yml
- job: win_python38_amd64 - job: win_python38_amd64
pool: pool:
vmImage: windows-2019 vmImage: windows-2019
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
dataclasses;python_version<"3.7" dataclasses;python_version<"3.7"
numpy;platform_machine=="x86_64" and python_version<"3.9" numpy;platform_machine=="x86_64" and python_version<"3.9"
pendulum;sys_platform=="linux" and platform_machine=="x86_64" pendulum;sys_platform=="linux" and platform_machine=="x86_64"
psutil psutil;sys_platform!="windows" and python_version<"3.9"
pytest pytest
pytz pytz
typing_extensions;python_version>="3.6" and python_version<"3.8" typing_extensions;python_version>="3.6" and python_version<"3.8"
...@@ -6,4 +6,4 @@ ...@@ -6,4 +6,4 @@
pytest pytest
pytz pytz
typing_extensions;python_version>="3.6" and python_version<"3.8" typing_extensions;python_version>="3.6" and python_version<"3.8"
xxhash==1.4.3 # creates non-compact ASCII for test_str_ascii xxhash==1.4.3;sys_platform!="windows" and python_version<"3.9" # creates non-compact ASCII for test_str_ascii
...@@ -105,7 +105,10 @@ ...@@ -105,7 +105,10 @@
b'["2018-06-01T02:03:04+00:00"]', b'["2018-06-01T02:03:04+00:00"]',
) )
@unittest.skipIf(sys.version_info < (3, 9), "zoneinfo not available") @unittest.skipIf(
sys.version_info < (3, 9) or sys.platform.startswith("win"),
"zoneinfo not available",
)
def test_datetime_zoneinfo_positive(self): def test_datetime_zoneinfo_positive(self):
self.assertEqual( self.assertEqual(
orjson.dumps( orjson.dumps(
...@@ -125,7 +128,10 @@ ...@@ -125,7 +128,10 @@
b'["2018-01-01T02:03:04+08:00"]', b'["2018-01-01T02:03:04+08:00"]',
) )
@unittest.skipIf(sys.version_info < (3, 9), "zoneinfo not available") @unittest.skipIf(
sys.version_info < (3, 9) or sys.platform.startswith("win"),
"zoneinfo not available",
)
def test_datetime_zoneinfo_negative(self): def test_datetime_zoneinfo_negative(self):
self.assertEqual( self.assertEqual(
orjson.dumps( orjson.dumps(
......
...@@ -7,4 +7,5 @@ ...@@ -7,4 +7,5 @@
import unittest import unittest
from typing import List from typing import List
try:
import psutil import psutil
...@@ -10,4 +11,6 @@ ...@@ -10,4 +11,6 @@
import psutil import psutil
except ImportError:
psutil = None
import pytest import pytest
import orjson import orjson
...@@ -57,6 +60,9 @@ ...@@ -57,6 +60,9 @@
class MemoryTests(unittest.TestCase): class MemoryTests(unittest.TestCase):
@pytest.mark.skipif(
psutil is None, reason="psutil install broken on win, python3.9, Azure"
)
def test_memory_loads(self): def test_memory_loads(self):
""" """
loads() memory leak loads() memory leak
...@@ -70,6 +76,9 @@ ...@@ -70,6 +76,9 @@
gc.collect() gc.collect()
self.assertTrue(proc.memory_info().rss <= mem + MAX_INCREASE) self.assertTrue(proc.memory_info().rss <= mem + MAX_INCREASE)
@pytest.mark.skipif(
psutil is None, reason="psutil install broken on win, python3.9, Azure"
)
def test_memory_dumps(self): def test_memory_dumps(self):
""" """
dumps() memory leak dumps() memory leak
...@@ -84,6 +93,9 @@ ...@@ -84,6 +93,9 @@
gc.collect() gc.collect()
self.assertTrue(proc.memory_info().rss <= mem + MAX_INCREASE) self.assertTrue(proc.memory_info().rss <= mem + MAX_INCREASE)
@pytest.mark.skipif(
psutil is None, reason="psutil install broken on win, python3.9, Azure"
)
def test_memory_loads_exc(self): def test_memory_loads_exc(self):
""" """
loads() memory leak exception without a GC pause loads() memory leak exception without a GC pause
...@@ -102,6 +114,9 @@ ...@@ -102,6 +114,9 @@
self.assertTrue(proc.memory_info().rss <= mem + MAX_INCREASE) self.assertTrue(proc.memory_info().rss <= mem + MAX_INCREASE)
gc.enable() gc.enable()
@pytest.mark.skipif(
psutil is None, reason="psutil install broken on win, python3.9, Azure"
)
def test_memory_dumps_exc(self): def test_memory_dumps_exc(self):
""" """
dumps() memory leak exception without a GC pause dumps() memory leak exception without a GC pause
...@@ -121,6 +136,9 @@ ...@@ -121,6 +136,9 @@
self.assertTrue(proc.memory_info().rss <= mem + MAX_INCREASE) self.assertTrue(proc.memory_info().rss <= mem + MAX_INCREASE)
gc.enable() gc.enable()
@pytest.mark.skipif(
psutil is None, reason="psutil install broken on win, python3.9, Azure"
)
def test_memory_dumps_default(self): def test_memory_dumps_default(self):
""" """
dumps() default memory leak dumps() default memory leak
...@@ -144,6 +162,9 @@ ...@@ -144,6 +162,9 @@
gc.collect() gc.collect()
self.assertTrue(proc.memory_info().rss <= mem + MAX_INCREASE) self.assertTrue(proc.memory_info().rss <= mem + MAX_INCREASE)
@pytest.mark.skipif(
psutil is None, reason="psutil install broken on win, python3.9, Azure"
)
def test_memory_dumps_dataclass(self): def test_memory_dumps_dataclass(self):
""" """
dumps() dataclass memory leak dumps() dataclass memory leak
...@@ -157,6 +178,9 @@ ...@@ -157,6 +178,9 @@
gc.collect() gc.collect()
self.assertTrue(proc.memory_info().rss <= mem + MAX_INCREASE) self.assertTrue(proc.memory_info().rss <= mem + MAX_INCREASE)
@pytest.mark.skipif(
psutil is None, reason="psutil install broken on win, python3.9, Azure"
)
def test_memory_loads_keys(self): def test_memory_loads_keys(self):
""" """
loads() memory leak with number of keys causing cache eviction loads() memory leak with number of keys causing cache eviction
...@@ -173,6 +197,9 @@ ...@@ -173,6 +197,9 @@
gc.collect() gc.collect()
self.assertTrue(proc.memory_info().rss <= mem + MAX_INCREASE) self.assertTrue(proc.memory_info().rss <= mem + MAX_INCREASE)
@pytest.mark.skipif(
psutil is None, reason="psutil install broken on win, python3.9, Azure"
)
@pytest.mark.skipif(numpy is None, reason="numpy is not installed") @pytest.mark.skipif(numpy is None, reason="numpy is not installed")
def test_memory_dumps_numpy(self): def test_memory_dumps_numpy(self):
""" """
......
...@@ -2,4 +2,7 @@ ...@@ -2,4 +2,7 @@
import unittest import unittest
import pytest
try:
import xxhash import xxhash
...@@ -5,4 +8,6 @@ ...@@ -5,4 +8,6 @@
import xxhash import xxhash
except ImportError:
xxhash = None
import orjson import orjson
...@@ -73,6 +78,9 @@ ...@@ -73,6 +78,9 @@
orjson.JSONEncodeError, orjson.dumps, b"\xed\xa0\xbd\xed\xba\x80" orjson.JSONEncodeError, orjson.dumps, b"\xed\xa0\xbd\xed\xba\x80"
) # \ud83d\ude80 ) # \ud83d\ude80
@pytest.mark.skipif(
xxhash is None, reason="xxhash install broken on win, python3.9, Azure"
)
def test_str_ascii(self): def test_str_ascii(self):
""" """
str is ASCII but not compact str is ASCII but not compact
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment