tswast: System tests pass locally.

```
$ nox -s system-3.7 -r
nox > Running session system-3.7
nox > Re-using existing virtualenv at /Users/swast/src/pydata-google-auth/.nox/system-3-7.
nox > pip install --upgrade mock pyfakefs pytest pytest-cov
nox > pip install --upgrade -e .
nox > pytest ./tests/system --quiet --cov=pydata_google_auth --cov=tests.system --cov-report xml:/tmp/pytest-cov.xml
.....                                                                                                                            [100%]

---------- coverage: platform darwin, python 3.7.2-final-0 -----------
Coverage XML written to file /tmp/pytest-cov.xml

5 passed in 30.53 seconds
nox > Session system-3.7 was successful.
```
diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst
index 49a0433..0e07cd3 100644
--- a/docs/source/changelog.rst
+++ b/docs/source/changelog.rst
@@ -1,6 +1,19 @@
 Changelog
 =========
 
+.. _changelog-0.1.3:
+
+0.1.3 / TBD
+-----------
+
+Bug Fixes
+^^^^^^^^^
+
+- Respect the ``dirname`` and ``filename`` arguments to the
+  :class:`~pydata_google_auth.cache.ReadWriteCredentialsCache` and
+  :class:`~pydata_google_auth.cache.WriteOnlyCredentialsCache` constructors.
+  (:issue:`16`, :issue:`17`)
+
 .. _changelog-0.1.2:
 
 0.1.2 / (2019-02-01)
diff --git a/pydata_google_auth/cache.py b/pydata_google_auth/cache.py
index a5d7aa6..cd2ff61 100644
--- a/pydata_google_auth/cache.py
+++ b/pydata_google_auth/cache.py
@@ -169,7 +169,7 @@ class ReadWriteCredentialsCache(CredentialsCache):
 
     def __init__(self, dirname=_DIRNAME, filename=_FILENAME):
         super(ReadWriteCredentialsCache, self).__init__()
-        self._path = _get_default_credentials_path(_DIRNAME, _FILENAME)
+        self._path = _get_default_credentials_path(dirname, filename)
 
     def load(self):
         """
@@ -215,7 +215,7 @@ class WriteOnlyCredentialsCache(CredentialsCache):
 
     def __init__(self, dirname=_DIRNAME, filename=_FILENAME):
         super(WriteOnlyCredentialsCache, self).__init__()
-        self._path = _get_default_credentials_path(_DIRNAME, _FILENAME)
+        self._path = _get_default_credentials_path(dirname, filename)
 
     def save(self, credentials):
         """

"dirname" and "filename" not used in ReadWriteCredentialsCache
The arguments "dirname" and "filename" are never used. Instead "_DIRNAME" and "_FILENAME" are used.

→ `self._path = _get_default_credentials_path(_DIRNAME, _FILENAME)`
I think it should be:
→ `self._path = _get_default_credentials_path(dirname, filename)`
diff --git a/tests/unit/test_cache.py b/tests/unit/test_cache.py
index 672f72f..cc0ff34 100644
--- a/tests/unit/test_cache.py
+++ b/tests/unit/test_cache.py
@@ -54,3 +54,31 @@ def test__save_user_account_credentials_wo_directory(module_under_test, fs):
     with open(path) as fp:
         serialized_data = json.load(fp)
     assert serialized_data["refresh_token"] == "refresh_token"
+
+
+def test_ReadWriteCredentialsCache_sets_path(module_under_test):
+    """ReadWriteCredentialsCache ctor should respect dirname and filename.
+
+    See: https://github.com/pydata/pydata-google-auth/issues/16
+    """
+    cache = module_under_test.ReadWriteCredentialsCache(
+        dirname="dirtest", filename="filetest.json"
+    )
+    path = os.path.normpath(cache._path)
+    parts = path.split(os.sep)
+    assert parts[-2] == "dirtest"
+    assert parts[-1] == "filetest.json"
+
+
+def test_WriteOnlyCredentialsCache_sets_path(module_under_test):
+    """ReadWriteCredentialsCache ctor should respect dirname and filename.
+
+    See: https://github.com/pydata/pydata-google-auth/issues/16
+    """
+    cache = module_under_test.WriteOnlyCredentialsCache(
+        dirname="dirtest", filename="filetest.json"
+    )
+    path = os.path.normpath(cache._path)
+    parts = path.split(os.sep)
+    assert parts[-2] == "dirtest"
+    assert parts[-1] == "filetest.json"

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-mock pyfakefs
apt-get update apt-get install -y gcc
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
cachetools==4.2.4
certifi==2021.5.30
charset-normalizer==2.0.12
coverage==6.2
google-auth==2.22.0
google-auth-oauthlib==1.2.1
idna==3.10
importlib-metadata==4.8.3
iniconfig==1.1.1
oauthlib==3.2.2
packaging==21.3
pluggy==1.0.0
py==1.11.0
pyasn1==0.5.1
pyasn1-modules==0.3.0
-e git+https://github.com/pydata/pydata-google-auth.git@574eb5204cf43bc5832cfe26b4fff239adf96aa8#egg=pydata_google_auth
pyfakefs==4.6.3
pyparsing==3.1.4
pytest==7.0.1
pytest-cov==4.0.0
pytest-mock==3.6.1
requests==2.27.1
requests-oauthlib==2.0.0
rsa==4.9
six==1.17.0
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
zipp==3.6.0

name: pydata-google-auth
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - cachetools==4.2.4
      - charset-normalizer==2.0.12
      - coverage==6.2
      - google-auth==2.22.0
      - google-auth-oauthlib==1.2.1
      - idna==3.10
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - oauthlib==3.2.2
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyasn1==0.5.1
      - pyasn1-modules==0.3.0
      - pyfakefs==4.6.3
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - pytest-mock==3.6.1
      - requests==2.27.1
      - requests-oauthlib==2.0.0
      - rsa==4.9
      - six==1.17.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/pydata-google-auth

tests/unit/test_cache.py::test_ReadWriteCredentialsCache_sets_path tests/unit/test_cache.py::test_WriteOnlyCredentialsCache_sets_path
tests/unit/test_cache.py::test_import_unwriteable_fs tests/unit/test_cache.py::test__save_user_account_credentials_wo_directory
pydata_google_auth/cache.py docs/source/changelog.rst
pydata_google_auth/cache.py docs/source/changelog.rst