-
Notifications
You must be signed in to change notification settings - Fork 224
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
Use the pytest-randomly plugin to run tests in random order #2936
base: main
Are you sure you want to change the base?
Conversation
@weiji14 Randomly running the tests finds a minor bug in PR #2774. Some tests like below fail: ______________________ test_virtualfile_from_matrix_slice ______________________
dtypes = ['int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', ...]
def test_virtualfile_from_matrix_slice(dtypes):
"""
Test transforming a slice of a larger array to virtual file dataset.
"""
shape = (10, 6)
for dtype in dtypes:
> full_data = np.arange(shape[0] * shape[1], dtype=dtype).reshape(shape)
E TypeError: data type 'int8[pyarrow]' not understood The failures are because pygmt/pygmt/tests/test_clib_virtualfiles.py Lines 328 to 329 in 925e90e
|
Good spotting, I opened a PR at #2941 to fix this. |
Note to myself: This is the command to reproduce the errors stably
If adding
The region |
Save the content above into a test file Here are two normal scripts to understand the differences.
Related to #1242 but is more complicated than that one. |
Description of proposed changes
Fixes #
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version