certbot/certbot/tests
Adrien Ferrand 0324d1740e Ensure relpath is executed on paths in the same drive (#7335)
On Windows you can have several drives (`C:`, `D:`, ...), that is the roughly (really roughly) equivalent of mount points, since each drive is usually associated to a specific physical partition.

So you can have paths like `C:\one\path`, `D:\another\path`.

In parallel, `os.path.relpath(path, start='.')` calculates the relative path between the given `path` and a `start` path (current directory if not provided). In recent versions of Python, `os.path.relpath` will fail if `path` and `start` are not on the same drive, because a relative path between two paths like `C:\one\path`, `D:\another\path` is not possible.

In saw unit tests failing because of this in two locations. This occurs when the certbot codebase that is tested is on a given drive (like `D:`) while the default temporary directory used by `tempfile` is on another drive (most of the time located in `C:` drive).

This PR fixes that.
2019-08-23 12:53:30 -07:00
..
compat [Windows] Fix closing files descriptors during unit tests (#7326) 2019-08-16 11:08:42 +02:00
display [Windows] Security model for files permissions - STEP 3d (#6968) 2019-07-03 16:20:43 -07:00
testdata Validate OCSP responses in case an explicit responder is designated (#7054) 2019-06-03 22:55:26 +03:00
__init__.py s/Let's Encrypt/Certbot 2016-04-13 16:13:50 -07:00
account_test.py Fix unit tests on Windows (#7270) 2019-08-01 10:39:46 -07:00
acme_util.py Merge branch 'master' into pylint 2019-04-02 22:32:01 +02:00
auth_handler_test.py Update to Pylint 1.9.4 and corrections 2019-04-09 09:22:19 +02:00
cert_manager_test.py [Windows] Security model for files permissions - STEP 3f (#7233) 2019-07-26 00:25:36 +02:00
cli_test.py Ensure relpath is executed on paths in the same drive (#7335) 2019-08-23 12:53:30 -07:00
client_test.py [Windows] Security model for files permissions - STEP 3a (#6964) 2019-06-20 10:52:43 -07:00
configuration_test.py [Windows] Security model for files permissions - STEP 2 (#6895) 2019-04-12 13:32:51 -07:00
crypto_util_test.py [Windows] Security model for files permissions - STEP 3f (#7233) 2019-07-26 00:25:36 +02:00
eff_test.py Fix Pylint upgrade issues 2018-05-16 20:37:39 +00:00
error_handler_test.py [Windows] Security model for files permissions - STEP 2 (#6895) 2019-04-12 13:32:51 -07:00
errors_test.py No longer mask failed challenge errors with encoding errors (#4867) 2017-07-10 21:05:52 -05:00
hook_test.py Fix unit tests on Windows (#7270) 2019-08-01 10:39:46 -07:00
lock_test.py [Windows] Security model for files permissions - STEP 2 (#6895) 2019-04-12 13:32:51 -07:00
log_test.py [Windows] Security model for files permissions - STEP 3f (#7233) 2019-07-26 00:25:36 +02:00
main_test.py [Windows] Security model for files permissions - STEP 3f (#7233) 2019-07-26 00:25:36 +02:00
notify_test.py s/letsencrypt/certbot 2016-04-13 16:03:59 -07:00
ocsp_test.py Validate OCSP responses in case an explicit responder is designated (#7054) 2019-06-03 22:55:26 +03:00
renewal_test.py Avoid to delete both webroot_map and webroot_path (#7095) 2019-05-28 15:16:12 -07:00
renewupdater_test.py s/assertEquals/assertEqual 2018-07-11 17:33:04 -07:00
reporter_test.py Merge branch 'master' into pylint 2019-04-02 22:32:01 +02:00
reverter_test.py [Windows] Security model for files permissions - STEP 3d (#6968) 2019-07-03 16:20:43 -07:00
storage_test.py [Windows] Security model for files permissions - STEP 3f (#7233) 2019-07-26 00:25:36 +02:00
util.py [Windows] Fix closing files descriptors during unit tests (#7326) 2019-08-16 11:08:42 +02:00
util_test.py Fix unit tests on Windows (#7270) 2019-08-01 10:39:46 -07:00