Giter Site home page Giter Site logo

Comments (3)

lxp avatar lxp commented on June 4, 2024

@Terry-Kennedy Can you verify, if the current python3 branch fixes the issue on your system too?

from cfv.

Terry-Kennedy avatar Terry-Kennedy commented on June 4, 2024

It does fix the issue and the test suite now runs cleanly.

But I'm confused - if the file it wants to test against is in test/testdata/data1 why does it seem to be passing /data1 (in the root of the filesystem) instead of test/testdata/data1? Note that I have a /data2 and /data3 and tests don't trip over those...

from cfv.

lxp avatar lxp commented on June 4, 2024

The affected test case tests the option --strippaths=none with the checksum file https://github.com/cfv-project/cfv/blob/python3/test/testdata/teststrip-none.csv4, which references /data1. This option changes the default behavior (--strippaths=0), so that the root folder or drive is not stripped.

As it is impossible to write a static positive test case for this, because the temp directory path changes with every run and we do not want to write anywhere outside that temp directory, this test case is implemented as negative test case.
If the option is applied correctly, it previously expected the result not found. I changed it to check if /data1 actually exists and to expect the result bad crc in such a case.

If there would be a major implementation error with the --strippaths=none option, then one outcome could be that it strips the root folder and finds the file in test/testdata/data1, which would result in OK and, therefore, in a failed test case.

The --strippaths test cases only use data1, and not the other test files. Therefore, you don't see a problem with the others.

One additional note: If I would want to rename the test file data1, this would basically affect all tests and I would have to change or regenerate nearly all static test checksum files located in test/testdata.

I hope this explains the issue well enough. I am going to close the issue, if you still have questions regarding it, you can just write another comment or if that doesn't work just re-open the issue.

from cfv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.