certbot/certbot-nginx/certbot_nginx/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
..
testdata/etc_nginx Allow multiple add_headers directives (#6068) 2018-06-04 17:44:51 -07:00
__init__.py s/Let's Encrypt/Certbot certbot-nginx 2016-04-13 16:49:30 -07:00
configurator_test.py Move Nginx TLS configuration files into a specific folder (#7300) 2019-08-05 15:45:08 -07:00
display_ops_test.py Nginx plugin wildcard support for ACMEv2 (#5619) 2018-03-01 14:05:49 -08:00
http_01_test.py [Windows] Working unit tests for certbot-nginx (#6782) 2019-02-20 16:20:16 -08:00
nginxparser_test.py Update parser to match new Nginx functionality (#6381) 2018-09-18 12:52:11 -07:00
obj_test.py Allow 'default' along with 'default_server' in Nginx (#5788) 2018-03-26 14:56:31 -07:00
parser_obj_test.py assertEquals --> assertEqual 2018-10-31 17:28:47 -07:00
parser_test.py Ensure relpath is executed on paths in the same drive (#7335) 2019-08-23 12:53:30 -07:00
util.py [Windows] Fix closing files descriptors during unit tests (#7326) 2019-08-16 11:08:42 +02:00