Skip to content

Commit 4d37293

Browse files
akxrayluo
andauthored
Remove mentions of Travis CI (#126)
* Remove mentions of Travis CI * Fix a typo --------- Co-authored-by: Ray Luo <[email protected]>
1 parent 52307ec commit 4d37293

File tree

5 files changed

+20
-137
lines changed

5 files changed

+20
-137
lines changed

.travis.yml

Lines changed: 0 additions & 106 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
io.open('msal_extensions/__init__.py', encoding='utf_8_sig').read()
99
).group(1)
1010

11-
try:
12-
long_description = open('README.md').read()
13-
except OSError:
14-
long_description = "README.md is not accessible on TRAVIS CI's Python 3.5"
11+
long_description = open('README.md').read()
1512

1613
setup(
1714
name='msal-extensions',

tests/test_persistence.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ def _is_env_var_defined(env_var):
1919

2020
# Note: If you use tox, remember to pass them through via tox.ini
2121
# https://tox.wiki/en/latest/example/basic.html#passing-down-environment-variables
22-
is_running_on_travis_ci = _is_env_var_defined("TRAVIS")
2322
is_running_on_github_ci = _is_env_var_defined("GITHUB_ACTIONS")
2423

2524
@pytest.fixture
@@ -46,45 +45,45 @@ def test_nonexistent_file_persistence(temp_location):
4645
_test_nonexistent_persistence(FilePersistence(temp_location))
4746

4847
@pytest.mark.skipif(
49-
is_running_on_travis_ci or not sys.platform.startswith('win'),
48+
not sys.platform.startswith('win'),
5049
reason="Requires Windows Desktop")
5150
def test_file_persistence_with_data_protection(temp_location):
5251
try:
5352
_test_persistence_roundtrip(FilePersistenceWithDataProtection(temp_location))
5453
except PersistenceDecryptionError:
55-
if is_running_on_github_ci or is_running_on_travis_ci:
54+
if is_running_on_github_ci:
5655
logging.warning("DPAPI tends to fail on Windows VM. Run this on your desktop to double check.")
5756
else:
5857
raise
5958

6059
@pytest.mark.skipif(
61-
is_running_on_travis_ci or not sys.platform.startswith('win'),
60+
not sys.platform.startswith('win'),
6261
reason="Requires Windows Desktop")
6362
def test_nonexistent_file_persistence_with_data_protection(temp_location):
6463
_test_nonexistent_persistence(FilePersistenceWithDataProtection(temp_location))
6564

6665
@pytest.mark.skipif(
6766
not sys.platform.startswith('darwin'),
68-
reason="Requires OSX. Whether running on TRAVIS CI does not seem to matter.")
67+
reason="Requires OSX.")
6968
def test_keychain_persistence(temp_location):
7069
_test_persistence_roundtrip(KeychainPersistence(temp_location))
7170

7271
@pytest.mark.skipif(
7372
not sys.platform.startswith('darwin'),
74-
reason="Requires OSX. Whether running on TRAVIS CI does not seem to matter.")
73+
reason="Requires OSX.")
7574
def test_nonexistent_keychain_persistence(temp_location):
7675
random_service_name = random_account_name = str(id(temp_location))
7776
_test_nonexistent_persistence(
7877
KeychainPersistence(temp_location, random_service_name, random_account_name))
7978

8079
@pytest.mark.skipif(
81-
is_running_on_travis_ci or not sys.platform.startswith('linux'),
80+
not sys.platform.startswith('linux'),
8281
reason="Requires Linux Desktop. Headless or SSH session won't work.")
8382
def test_libsecret_persistence(temp_location):
8483
_test_persistence_roundtrip(LibsecretPersistence(temp_location))
8584

8685
@pytest.mark.skipif(
87-
is_running_on_travis_ci or not sys.platform.startswith('linux'),
86+
not sys.platform.startswith('linux'),
8887
reason="Requires Linux Desktop. Headless or SSH session won't work.")
8988
def test_nonexistent_libsecret_persistence(temp_location):
9089
random_schema_name = random_value = str(id(temp_location))

tests/test_windows_backend.py

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,18 @@ def test_dpapi_roundtrip_with_entropy():
2727
uuid.uuid4().hex,
2828
]
2929

30-
try:
31-
for tc in test_cases:
32-
ciphered = subject_with_entropy.protect(tc)
33-
assert ciphered != tc
34-
35-
got = subject_with_entropy.unprotect(ciphered)
36-
assert got == tc
37-
38-
ciphered = subject_without_entropy.protect(tc)
39-
assert ciphered != tc
40-
41-
got = subject_without_entropy.unprotect(ciphered)
42-
assert got == tc
43-
except OSError as exp:
44-
if exp.errno == errno.EIO and os.getenv('TRAVIS_REPO_SLUG'):
45-
pytest.skip('DPAPI tests are known to fail in TravisCI. This effort tracked by '
46-
'https://github.com/AzureAD/microsoft-authentication-extentions-for-python'
47-
'/issues/21')
30+
for tc in test_cases:
31+
ciphered = subject_with_entropy.protect(tc)
32+
assert ciphered != tc
33+
34+
got = subject_with_entropy.unprotect(ciphered)
35+
assert got == tc
36+
37+
ciphered = subject_without_entropy.protect(tc)
38+
assert ciphered != tc
39+
40+
got = subject_without_entropy.unprotect(ciphered)
41+
assert got == tc
4842

4943

5044
def test_read_msal_cache_direct():

tox.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ envlist = py27,py35,py36,py37,py38,py39,py310,py311,py312
44
[testenv]
55
deps = pytest
66
passenv =
7-
TRAVIS
87
GITHUB_ACTIONS
98

109
commands =

0 commit comments

Comments
 (0)