159 questions
0
votes
0
answers
71
views
KL divergence between Normal Inverse Gaussian distributions in JAX/ TF
I want to write a Python script which approximates the KL divergence between NIG distributions, as parameterized in tensorflow. To do so, I want to use the chain rule for KL divergences and need to ...
0
votes
1
answer
345
views
Test Data parameterization in TOSCA
I have a Test case in TOSCA.
The Test is to add 10 products to cart in one execution. In the next run, I need to run the same test with different 10 different products and so on. I have a total of 5k ...
0
votes
0
answers
28
views
Programmatically Searching Multiple Columns for Value using Psycopg2
I'm working on a full-stack web project to database native plants in my area, and I'm using PostgreSQL and Python on my backend.
An important part of the tool is the ability to filter plants using ...
0
votes
1
answer
82
views
setup function in class doesn't work as expected while passing parameterized values
I have no idea why modifying the code mentioned here to the following doesn't work? The variables are not accessible inside the tests and setup is being invoked before every test despite the scope ...
0
votes
2
answers
68
views
Indirect parametrization to multiple fixtures without increasing test scenarios
I have three fixtures
fixture_1, fixture_2, fixture_3. All three of these fixtures have dictionaries, and return a value based on the key provided.
I want to use indirect parametrization to output ...
1
vote
0
answers
67
views
How does Forced Parameterization impact queries when using SET options such as quoted identifier?
When using Simple Parameterization in the AdventureWorks database, you can execute the following query:
USE [AdventureWorks2022]
GO
SET QUOTED_IDENTIFIER OFF
SELECT "True" FROM Person....
0
votes
1
answer
387
views
How to pass a CASE statement as a Snowflake query binding
I am trying to pass a CASE statement similar to the one below as a column in a SELECT statement on a Snowflake query. I am doing this by creating bindings using SqlKata in a .NET application and ...
0
votes
1
answer
72
views
Tuple problem with parameterized SQLite query
I'm working on a telethon-based telegram chatbot that can query a customer db given a last name in the following format: /search thompson, but am having some trouble using the fill function to keep ...
0
votes
1
answer
27
views
How to make the second parameterized variable in pytest a function of the first?
I have a pytest test that looks like this:
@pytest.mark.parametrize('type', ['a', 'b', 'c'])
@pytest.mark.parametrize('val', list(range(0, VAR_THAT_IS_FUNCTION_OF_TYPE)))
def test(type, val):
Where ...
0
votes
0
answers
35
views
Parameterized Function for lcmm model
I want to write a function "lcga0" that does the same as "demomodel" parameterizing the dependent variable, because I want to run the model 2x for 2 different dependent variables. ...
0
votes
1
answer
40
views
How to run the tests in same order given in pytest parametrize
I have test case which I want to execute with multiple test data. Using CSV to provide data and use same data for parameterization. But when I execute parameterize test case, the sequence of test data ...
0
votes
0
answers
117
views
Pytest - execute test case only if previous test case fails
I have two test cases test_A(a,b,c) and test_B(a,b,c) in a python file. I use parameterization ( metafunc.parametrize("a,b,c",[(a1,a2,a3),....(y1,y2,y3)]) to pass 6 set of parameters ...
3
votes
2
answers
542
views
Passing functions as a parameter in pytest
I need to pass function as arguments in pytest parametrization.
and need to call those functions inside test function. Is there any way to do it without using eval?
I have fixtures defined in conftest....
1
vote
1
answer
125
views
Bandit vulnerability on 'Drop View <View_Name>'
I am not sure why bandit is notifying the below as 'Detected possible formatted SQL query. Use parameterized queries instead.':
conn.execute(f"DROP VIEW {view_name};")
Is there a way to ...
0
votes
2
answers
51
views
VB parameterization using string literals instead of assigning Params
I am attempting to parameterize my query, but I can see with the message box, the actual query is just using string literals @st & @sn instead of the values passed in. I really can't seem to ...