Skip to content

Commit 532c40a

Browse files
[TESTS] Adds pytest-randomly to shuffle tests (#98)
* [TESTS] Adds pytest-randomly to shuffle tests * [TESTS] Unit test modifying global data
1 parent 3b617f3 commit 532c40a

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8-
## [unreleased] - 2024-11-01
8+
## [v0.3.12] - 2024-11-22
99
### Added
1010
- Added pre-commit hooks and Github CI action for code formatting and linting.
1111
- Added MyPy with strict settings to enforce type hints (and Github CI action).
12+
- Added `pytest-randomly` to shuffle test order
1213

1314
## [v0.3.11] - 2024-11-01
1415
### Fixed

learnosity_sdk/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = 'v0.3.11'
1+
__version__ = 'v0.3.12'

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
'pytest >=4.6.6',
2424
'pytest-cov >=2.8.1',
2525
'pytest-subtests',
26+
'pytest-randomly',
2627
'responses >=0.8.1',
2728
'types-requests',
2829
'types-Jinja2',

tests/integration/test_dataapi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,9 @@ def test_real_question_request(self) -> None:
103103
"""Make a request against Data Api to ensure the SDK works"""
104104
client = DataApi()
105105

106-
questions_request['limit'] = 3
107-
res = client.request(self.__build_base_url() + questions_endpoint, security, consumer_secret, questions_request,
106+
local_questions_request = questions_request.copy()
107+
local_questions_request['limit'] = 3
108+
res = client.request(self.__build_base_url() + questions_endpoint, security, consumer_secret, local_questions_request,
108109
action)
109110

110111
returned_json = res.json()

0 commit comments

Comments
 (0)