question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove tests.lib.path

See original GitHub issue

File: https://github.com/pypa/pip/blob/master/tests/lib/path.py

There exist better alternatives to rolling out our own “Path” class for file handling – the stdlib pathlib.Path and pathlib2.Path (backport to Py2) should be more than sufficient to satisfy our needs now.

if sys.python_version_info[0] >= 3:
    from pathlib import Path
else:
    from pathlib2 import Path

To be done:

  • Confirm that the pathlib equivalent is indeed enough for our needs.
    • Figure out the relevant workarounds if needed.
  • Drop this file and just directly perform the imports.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:37 (34 by maintainers)

github_iconTop GitHub Comments

2reactions
sbidoulcommented, Jun 9, 2020
2reactions
chrahuntcommented, Mar 6, 2020

Please see my comment here (specifically 2, 3, and 4) outlining the issues with switching, mostly due to the fact that the current tests.lib.path.Path inherits from str. We would want to address those issues in several PRs before switching to pathlib.Path/pathlib2.Path.

Once no tests fail, we’re all good.

Not true, we can have false negatives as mentioned in 4.

@ssurbhi560, don’t let this dissuade you! I would just be very thoughtful and submit small PRs that get us closer to being able to make the switch. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to exclude a library from the eclipse default test classpath?
When running tests that only involve project A, then the class path is perfect, it only contains version 1 of lib.
Read more >
Permanently removing paths that have previously been used ...
The problem seems to be that despite having removed the files and fixing the dependencies in the vi.lib directory, LabVIEW still is looking ......
Read more >
Testing Extensions - Visual Studio Code
Write tests for your Visual Studio Code extension (plug-in). ... The path to the extension test runner script // Passed to ... Remove...
Read more >
Test Library Blocks - MATLAB & Simulink - MathWorks
Test reusable components using tests for libraries, library blocks, and linked blocks. ... If you do not need the test harnesses, you can...
Read more >
Integration tests in ASP.NET Core | Microsoft Learn
Learn how integration tests ensure that an app's components ... How the test infrastructure infers the app content root path; Disable shadow ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found