Replacing "is" with "==" in test_headers.py

Open Beginner friendly
#427 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
65/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
testing

Research direction

Open s3tests/functional/test_headers.py and locate the three string comparisons using is. Replace those comparison operators with ==, then run the affected test file. Done means all three instances are corrected and the test continues to pass.

Written by the indexing model from the issue text.

Description

Python will throw a syntax warning when a comparison is made between String using 'is' keyword. It is better to change the 'is' keyword with '==' for comparisons of String.

https://github.com/ceph/s3-tests/blob/master/s3tests/functional/test_headers.py
In the given file, there are three instances of this problem. There is a case of having a similarity of code in all the files of an Open Source project but the '==' keyword is used in a lot of languages and is a norm.

I can make a PR correcting this simple issue if a maintainer approves of it.

Dominant language
Python
Stars
372
Forks
328
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ceph/s3-tests

All issues in ceph/s3-tests

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.