GithubHelp home page GithubHelp logo

acroucher / fruitpy Goto Github PK

View Code? Open in Web Editor NEW
43.0 43.0 9.0 80 KB

Python interface for the FRUIT Fortran unit testing framework

License: GNU General Public License v3.0

Python 85.51% Fortran 14.49%
fortran fruit python unit-testing

fruitpy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fruitpy's Issues

Error installing libfruit.so

The fruit_makefile doesn't create a module file. This causes the make install command to fail as it can't find and *.mod files.

Error when first line of test module contains docstring !<

Hi,

I ran into a weird error when using FRUITPy: If the first line (before module) contains a comment (of the form !<, I did not test others), the generated test driver will have a line

use contains

which causes some issues because I do not have a module named contains

Daan

ps. Thanks for making FRUITPy, it made my life a bit easier :)

FRUITPy integration into FOODiE. Some hints are necessary

Dear Adrian,

I would like to try your FRUITPy for the tests facility of FOODiE. However, I think I will not have much time devoted to this aim. In particular, I think I cannot study in details fruit library, thus I come to you and your FRUITPy.

Can you explain why I will like to use your wrapper? Are the FRUITPy documentations compressed into its README and one-page-wiki, or are there other sources?

Thank you for sharing your work!

My best regards,
Stefano

Build errors are not handled

Following the "in 3 minutes" example on the wiki, if you don't copy out the Makefile:

$ python3 run.py 
make: *** No targets specified and no makefile found.  Stop.
Traceback (most recent call last):
  File "run.py", line 8, in <module>
    suite.summary()
  File ".../FRUIT.py", line 391, in summary
    if self.success:
AttributeError: 'test_suite' object has no attribute 'success'

Of course, not adding the Makefile is a bad idea, but the same thing happens if you there is some other failure when running make. It would be nicer if the status instead listed those tests as ERRORs (instead of FAILs).

FRUITPy example doesn't work

I'm trying to work through the example on the wiki, but the output of the program is off. I get:

$ python FRUITPy_Script.py
make: 'calculator_test_driver' is up to date.
Some tests failed:



Hit rate:
  asserts:  0 / 0 (  0%)
  cases  :  0 / 0 (  0%)

Instead of it actually listing the files that failed.

Here's the contents of the driver file that FRUITPy created:
calculator_test_driver.f90:

program tests

  ! Driver program for FRUIT unit tests in:
  ! calculator_test.f90

  ! Generated by FRUITPy.

  use fruit
  use calculator_test

  implicit none
  integer :: failed_count

  call init_fruit

  call run_test_case(test_calculator_should_produce_4_when_2_and_2_are_inputs,"test_calculator_should_produce_4_when_2_and_2_are_inputs")                                                                                                     

  call get_failed_count(failed_count)
  call fruit_summary
  call fruit_finalize
  if (failed_count > 0) stop 1
  
end program tests

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.