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.

Target files not only packages.

See original GitHub issue

Hi, thank you for the useful project!

Is it possible to setup import linter to validate my test suite, not my packages?

The source code layout looks like this:

src/
  _priavte/
    __init__.py
  public/
    __init__.py
tests/
  test_one.py
  test_two.py

I want to test modules only touches public package and not private.

Is it possible to archive with import linter?

Best regards, Artem.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
seddonymcommented, Oct 5, 2019

I see… Very interesting, I’ve not thought about tests like that before.

I’ll have a think about what the best thing is for import-linter.

0reactions
proofit404commented, Oct 5, 2019

Hi,

Sorry for the long delay.

Turning test modules into a package is a workaround for some tool not working.

It enables an ability to cross import stuff from different test files. Without that, you’re forced to express useful pieces of code with py.test fixtures. And that forces you to think about the setup and teardown process explicitly.

For example, coverage didn’t work without tests being a package a long time ago. But they decided to fix that instead of forcing everyone to turn tests into a package.

Have a good day 🎉

Best regards, Artem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Include File in NuGet package on Build, only if it does not exist
From my original question linked above I have a NuGet package which when downloaded creates a folder called PageSettings , into which is...
Read more >
Security: Should random code execution in target files be at ...
Is it possible to add warnings if there are target files in the package maybe even only if target files contain arbitrary C#...
Read more >
Targets - Parcel
Targets specify the output directory or file path, as well as information about how your code should be compiled. By default, Parcel includes...
Read more >
Standard Targets (GNU Coding Standards) - GNU.org
7.2.6 Standard Targets for Users. All GNU programs should have the following targets in their Makefiles: ' all '. Compile the entire program....
Read more >
tar_option_set: Set target options. - Rdrr.io
Set target options, including default arguments to tar_target() such as packages, storage format, iteration type, and cue. Only the non-null arguments are ...
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