Comments (2)
I've run into this problem with the examples before. I'll have a look at it. Any suggestions on how the examples could be run as part of the test suite?
from balanced-python.
We can either enumerate all the files in the directory and run them then check for return code == 0 or rewrite the examples to be importable (e.g. if __name__ == 'main': run_example()
).
I think the first is probably less work so doing it that way would be easier.
On the test side I think something like
import subprocess, sys
class ExampleTests(TestCase):
def test_examples_run(self):
for example_file_name in example_dir_files:
self.assertEqual(subprocess.call( sys.executeable + " " + example_file_name, shell=True), 0)
this is probably a pretty naive implementation but it has the general idea right.
hat tip to @coderanger for the sys.executable
move.
from balanced-python.
Related Issues (20)
- Write a test for sideloading
- BankAccount object '.bank_account_verification' returns a Resource instead of BankAccountVerification object HOT 3
- BankAccount bank_account_verification field HOT 1
- Card.associate_to_customer(customer) fails HOT 8
- Pagination for queries is broken in Python client HOT 3
- Is our version schema correct (for pip)? HOT 4
- The NoResultFound should be the one in balanced rather than wac
- Getting page object when it is only a single element.
- Source on debit coming back as resource type instead of card/bank account
- Failed to handle doesn't exist resource correctly HOT 11
- Push to card specs and scenarios
- associate bank account scenario using cards instead
- Limit on query filter is broken. always returns all objects HOT 1
- Exception Type for NoResultFound is incorrect
- Error messages not descriptive
- Make marketplace funding instrument transactions more convenient
- Ensure we cover the same test scenarios as the ruby client
- Run test results through a validator
- Resource query all to a empty list bug HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from balanced-python.