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.

Hello, I developed a program for testing the network behaviour (in python). In normal run it actually checks conditions and if they are not satisfied it updates an error log file.

Can I “produce” TAP file dinamically from my code? Something like

tap = newTapTestCase(...)
if !condition:
  tap.addError(...)
else:
  tap.addOk(...)
tap.close()

Riccardo

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mblaymancommented, Jan 22, 2018

tappy was designed with Python testing frameworks in mind so the internal tracking is not really exposed as public API. The closest thing to what you are looking for in tappy is the Tracker (https://github.com/python-tap/tappy/blob/master/tap/tracker.py) which has an API that supports add_ok, add_not_ok, and add_skip. I think the streaming mode would be closest to what you’d need. Something like:

from tap.tracker import Tracker

tracker = Tracker(streaming=True, stream=my_open_error_file)
tracker.add_ok('SomeTestCase', 'This is the test description')

You may also want to consider alternative TAP projects (http://tappy.readthedocs.io/en/latest/alternatives.html) as one of them might have an API closer to what you’re looking for.

Good luck!

0reactions
mblaymancommented, Mar 7, 2018

Cool! Best of luck to you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Information Correctly: Putting Info Together - GCF Global
Whether you're writing something online or in print, putting information together is an essential component. Learn some good tactics here.
Read more >
What is Information Use | IGI Global
1. It is the result of information access, for example: decision-making, problem solving, innovation and learning. · 2. The things people do with...
Read more >
How Google uses information from sites or apps that use our ...
How Google uses information from sites or apps that use our services ... Many websites and apps use Google services to improve their...
Read more >
Information Services & Use | IOS Press
Aims & Scope. Information Services & Use is an information and information technology oriented publication with a wide scope of subject matters.
Read more >
U.S. Copyright Office Fair Use Index
This does not mean, however, that all nonprofit education and noncommercial uses are fair and all commercial uses are not fair; instead, courts...
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