These tests only cover PyFit specific behavior, they do not cover behavior which is, or should be, common to all versions of FIT. See the fat directory and the FitLibrary specification tests for common behavior.
All of the collection verification fixtures should take any object (including dictionaries) which has the requested attributes.
First, we build a list
fit.AccTestFixtures.RowFixtureAT.ListBuilder | ||
new collection | list | |
new object | object1 | |
attribute | a1 | one |
attribute | a2 | 1 |
new object | object2 | |
attribute | a1 | two |
attribute | a2 | 2 |
new object | dict | |
attribute | a1 | three |
attribute | a2 | 3 |
set symbol |
then we check that it contains what it is supposed to
fitLib.FixtureFixture | ||
fixture | fit.AccTestFixtures.RowFixtureAT | |
a1 | a2 | |
rr | one | 1 |
rr | two | 2 |
rr | three | 3 |
We do the same thing, but this time returning a tuple as the collection. We're also going to juggle the order of the elements, just to see if that does anything
First, we build a list
fit.AccTestFixtures.RowFixtureAT.ListBuilder | ||
new collection | tuple | |
new object | dict | |
attribute | a1 | one |
attribute | a2 | 1 |
new object | object1 | |
attribute | a1 | three |
attribute | a2 | 3 |
new object | object2 | |
attribute | a1 | two |
attribute | a2 | 2 |
set symbol |
then we check that it contains what it is supposed to
fitLib.FixtureFixture | ||
fixture | fit.AccTestFixtures.RowFixtureAT | |
a1 | a2 | |
rr | one | 1 |
rr | two | 2 |
rr | three | 3 |
We do the same thing, but this time returning a dictionary as the collection. We're also going to juggle the order of the elements, just to see if that does anything.
First, we build the collection
fit.AccTestFixtures.RowFixtureAT.ListBuilder | ||
new collection | dict | |
new object | dict | 1 |
attribute | a1 | one |
attribute | a2 | 1 |
new object | object1 | 2 |
attribute | a1 | three |
attribute | a2 | 3 |
new object | object2 | 3 |
attribute | a1 | two |
attribute | a2 | 2 |
set symbol |
fitLib.FixtureFixture | ||
fixture | fit.AccTestFixtures.RowFixtureAT | |
a1 | a2 | |
rr | one | 1 |
rr | two | 2 |
rr | three | 3 |
We remove the metadata for one of the columns.
fit.AccTestFixtures.RowFixtureAT.ListBuilder | ||
new collection | dict | |
new object | dict | 1 |
attribute | a1 | one |
attribute | a2 | 1 |
attribute | German | ein |
new object | object1 | 2 |
attribute | a1 | three |
attribute | a2 | 3 |
attribute | German | drei |
new object | object2 | 3 |
attribute | a1 | two |
attribute | a2 | 2 |
attribute | German | zwei |
remove metadata | German | |
set symbol |
fitLib.FixtureFixture | |||
fixture | fit.AccTestFixtures.RowFixtureAT | ||
-e | a1 | German | a2 |
rwr | one | fie | 1 |
rwr | two | fi | 2 |
rwr | three | fo | 3 |
We change the column name.
fitLib.FixtureFixture | |||
fixture | fit.AccTestFixtures.RowFixtureAT | ||
-e | a1 | german | a2 |
one | fie | 1 | |
two | fi | 2 | |
three | fo | 3 |
We can invoke the fit.RowFixture without a subclass by specifying a symbol.
fit.AccTestFixtures.RowFixtureAT.ListBuilder | |||
new collection | list | ||
new object | object1 | ||
attribute | a1 | one | |
attribute | a2 | 1 | |
new object | object2 | ||
attribute | a1 | two | |
attribute | a2 | 2 | |
new object | dict | ||
attribute | a1 | three | |
attribute | a2 | 3 | |
set symbol | aSymbol |
fitLib.FixtureFixture | ||
fixture | fit.RowFixture | aSymbol |
a1 | a2 | |
rr | one | 1 |
rr | two | 2 |
rr | three | 3 |
The symbol doesn't exist in the table
fitLib.SpecifyFixture | ||||||||||
| ||||||||||
|