Skip to content

Commit 844d57a

Browse files
Better isolates tests from GH context
1 parent 37b0ccb commit 844d57a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def test_config_host_url_format_check(mocker, host, expected):
3333
mocker.patch('databricks.sdk.config.Config.init_auth')
3434
assert Config(host=host).host == expected
3535

36-
3736
def test_extra_and_upstream_user_agent(monkeypatch):
3837

3938
class MockUname:
@@ -42,6 +41,10 @@ class MockUname:
4241
def system(self):
4342
return 'TestOS'
4443

44+
# Clear all environment variables.
45+
for k in os.environ:
46+
monkeypatch.delenv(k, raising=False)
47+
4548
monkeypatch.setattr(platform, 'python_version', lambda: '3.0.0')
4649
monkeypatch.setattr(platform, 'uname', MockUname)
4750
monkeypatch.setenv('DATABRICKS_SDK_UPSTREAM', "upstream-product")

0 commit comments

Comments
 (0)