Jaymon / testdata

Python module to make testing easier, it can generate random data like names and text, run commands, fetch urls, create files and directories, and more
MIT License
10 stars 0 forks source link

If testdata.create_csv has no callbacks it should just create one row with the columns that are passed to it #71

Closed Jaymon closed 3 years ago

Jaymon commented 4 years ago

You can pass in callbacks to the columns:

testdata.create_csv({"foo": testdata.get_str, "bar": testdata.get_int})

and it will create a random amount of rows by default using those callbacks to generate values for the columns, but if you did something like this:

testdata.create_csv({"foo": "VALUE", "bar": 111111})

It would still create a random number of rows with set values of VALUE and 1111111, instead, it should just create 1 row with those values because there are no callbacks present.