Check http://flask.pocoo.org/docs/1.0/testing/
# test_stuff.py
class StuffTestCase(unittest.TestCase):
def setUp(self):
self.app = create_app('testing') # app factory
Check http://flask.pocoo.org/docs/1.0/testing/
# test_stuff.py
class StuffTestCase(unittest.TestCase):
def setUp(self):
self.app = create_app('testing') # app factory
The struggle is real: Basically this bit in a setup.py
worked for me.
extras_require={
'extrapackage': ["git@git+ssh://git@gitlab.com/<user>/<repository_name>.git"],
},
then it's possible to do pip install -e .[extrapackage]
given you have proper ssh
access
git reset --hard
and reflogGiven the requirements.txt
file
pytest
jutge
Consider the palindrome problem in palindrome.py
from flask_sqlalchemy import make_url | |
from urllib.parse import quote_plus | |
def build_connection_string(**params): | |
""" | |
Return the url for MSSQL Azure DB Instances | |
""" | |
connection_string = quote_plus( | |
("DRIVER={driver};" |
import sys [0/6141] | |
"""A simple python implementation of the FizzBuzz problem. | |
*caveat*: It considers zero as divisible by three and five | |
see https://www.google.com/search?client=ubuntu&channel=fs&q=fizzbuzz+problem&ie=utf-8&oe=utf-8 | |
and http://wiki.c2.com/?FizzBuzzInManyProgrammingLanguages | |
""" |
# basic renaming of files, to enforce a minimum consistency | |
from pathlib import Path | |
for ix, file in enumerate(sorted(Path.cwd().glob('*'))): | |
new_filename = f'{ix:02}_' + file.name.lower().replace(' ','_') | |
print(f'{file.name} > {new_filename}') | |
file.rename(new_filename) |
## instance/config.py | |
HELLO_ENABLED = False |
[user] | |
email = daquintanav@gmail.com | |
name = Diego Quintana | |
[alias] | |
a = add | |
co = checkout | |
st = status | |
ci = commit | |
br = branch | |
unstage = reset HEAD -- |