In #151, the code looks in more places for GitHub credentials. Now, a unit test fails.
====================================================================== FAILURES ======================================================================
____________________________________________________________ test_GitHub_credentials_none ____________________________________________________________
def test_GitHub_credentials_none():
token = github_handler.get_GitHub_credentials("This file does not exist.",)
> assert token is None
E AssertionError: assert 'the_local_github_token_here' is None
punx/tests/test_github_handler.py:144: AssertionError
============================================================== short test summary info ===============================================================
FAILED punx/tests/test_github_handler.py::test_GitHub_credentials_none - AssertionError: assert 'the_local_github_token_here' is None
=========================================================== 1 failed, 85 passed in 28.60s ============================================================
In this case, github_handler.get_GitHub_credentials() returns the token since it is found in an alternative. But the test specifies a file for the token and expects no token to be turned.
Either revise github_handler.get_GitHub_credentials() (to only look in the provided file if that is defined) or remove the unit test.
In #151, the code looks in more places for GitHub credentials. Now, a unit test fails.
In this case,
github_handler.get_GitHub_credentials()
returns the token since it is found in an alternative. But the test specifies a file for the token and expects no token to be turned.Either revise
github_handler.get_GitHub_credentials()
(to only look in the provided file if that is defined) or remove the unit test.