Skip to content
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

Triangle: a gap in the tests. #1567

Open
YuriyCherniy opened this issue Aug 9, 2019 · 3 comments
Open

Triangle: a gap in the tests. #1567

YuriyCherniy opened this issue Aug 9, 2019 · 3 comments
Labels

Comments

@YuriyCherniy
Copy link

YuriyCherniy commented Aug 9, 2019

I've wrote a function on the Python track for the triangle exercise that can cheat current tests. It was described in exercism/python#1894 and merged on the Python track. I was recommended by @cmccandless to create an issue in this repo to solve this problem for others track in the futere.

@cmccandless
Copy link
Contributor

Description edited to take advantage of GitHub quick linking syntax

@cmccandless
Copy link
Contributor

From exercism/python#1894

Adding a new test for scalene(sides) function and renaming another test to match the new test. Current tests for scalene(sides) function can be hacked by this code:

def scalene(sides):
    sides.sort()
    if sum(sides[:2]) < sides[2] or sides[1] == sides[2]:
        return False
    return True

while the new test not.

Proposed new test case

{
  "description": "two sides are equal and third side is larger",
  "property": "scalene",
  "input": {
    "sides": [3, 3, 4]
  },
  "expected": false
}

@kytrinyx
Copy link
Member

Thanks so much @YuriyCherniy !

This repo is currently on "lock-down" while we think through a few things. As such, I'm going to put this issue on hold for now, and we will come back to once we've worked through the issues with this repo that we need to address. You can read more here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants