Skip to content

Update tests for Python 3#83

Merged
ligurio merged 5 commits into
masterfrom
ligurio/gh-82-python-3
Jan 19, 2022
Merged

Update tests for Python 3#83
ligurio merged 5 commits into
masterfrom
ligurio/gh-82-python-3

Conversation

@ligurio
Copy link
Copy Markdown
Member

@ligurio ligurio commented Dec 1, 2021

Closes #82

@ligurio ligurio marked this pull request as draft December 1, 2021 16:23
@ligurio ligurio force-pushed the ligurio/gh-82-python-3 branch 6 times, most recently from 533c90b to 6745886 Compare December 20, 2021 11:07
@ligurio ligurio marked this pull request as ready for review December 20, 2021 11:11
@ligurio ligurio force-pushed the ligurio/gh-82-python-3 branch from 6745886 to 2b60dbf Compare December 20, 2021 14:27
Comment thread README.md Outdated
Comment thread test/binary/suite.ini Outdated
Comment thread README.md Outdated
Comment thread .github/workflows/testing.yaml
Comment thread test/internal/compat.py Outdated
Comment thread test/binary/binary-expire.test.py Outdated
Comment thread test/internal/memcached_connection.py Outdated
Comment thread test/binary/binary-boundary.test.py
Copy link
Copy Markdown
Contributor

@Totktonada Totktonada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see nothing criminal :) Feel free to push.

I left some stylistic thoughts. I don't know, where you'll find youself in a best balance between effort and result, but I suggest to stop at this point and go ahead :)

Test flush-all.test.py uses PyYAML and loads YAML file with yaml.load().
However, using yaml.load() is unsafe, and library shows warning in test
log:

```
<string>:19: YAMLLoadWarning: calling yaml.load() without Loader=... is
deprecated, as the default Loader is unsafe. Please read
https://msg.pyyaml.org/load
```

For more details see PyYAML wiki [1].

1. https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
@ligurio ligurio force-pushed the ligurio/gh-82-python-3 branch from 2b60dbf to 894aca6 Compare January 11, 2022 13:19
@ligurio ligurio requested a review from Totktonada January 14, 2022 13:56
@ligurio ligurio force-pushed the ligurio/gh-82-python-3 branch from 894aca6 to c9e8ed4 Compare January 14, 2022 13:57
Comment thread test/binary/binary-boundary.test.py
Convert print statement to function. In a Python 3 'print' becomes a
function, see [1]. Patch makes 'print' in a regression tests compatible with
Python 3.

Part of #82

1. https://docs.python.org/3/whatsnew/3.0.html#print-is-a-function
@ligurio ligurio force-pushed the ligurio/gh-82-python-3 branch from c9e8ed4 to 074b9c3 Compare January 17, 2022 08:14
@ligurio
Copy link
Copy Markdown
Member Author

ligurio commented Jan 17, 2022

[001] binary/binary.test.py                                           [ fail ]
[001] 
[001] Test failed! Result content mismatch:
[001] --- binary/binary.result	Mon Jan 17 08:14:55 2022
[001] +++ var/rejects/binary/binary.reject	Mon Jan 17 08:15:35 2022
[001] @@ -15,8 +15,6 @@
[001]  #------------------------------# test decrement #-----------------------------#
[001]  #---------------------------------# bug 220 #---------------------------------#
[001]  #----------------------------------# bug 21 #---------------------------------#
[001] -#----------------------------------# bug 48 #---------------------------------#
[001] -Error on line binary/binary.test.py:168: 0 not equal 1
[001]  #-----------------------------------------------------------------------------#
[001]  ################################ Diagnostics CAS ##############################
[001]  #-----------------------------------------------------------------------------#
[001] 

Python 2 support is EOL [1] and we should support to run our python
tests using Python 3.x. test-run used as test-runner for memcached
already supports Python 3, see [2].

Patch enable running tests using Python 3 on CI and removes
test/var/memcached symlink.

1. https://www.python.org/doc/sunset-python-2/
2. tarantool/test-run#20

Closes #82
@ligurio ligurio force-pushed the ligurio/gh-82-python-3 branch from 074b9c3 to 4accf37 Compare January 17, 2022 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update tests for Python 3

3 participants