Skip to content
Snippets Groups Projects
Select Git revision
  • eb4a9b4a0169db14cee072d98111cddcf4bcd4c2
  • master default protected
  • develop protected
  • cmake_boost_refactor
  • ubuntu_ci
  • mmtf
  • non-orthogonal-maps
  • no_boost_filesystem
  • data_viewer
  • 2.11.1
  • 2.11.0
  • 2.10.0
  • 2.9.3
  • 2.9.2
  • 2.9.1
  • 2.9.0
  • 2.8.0
  • 2.7.0
  • 2.6.1
  • 2.6.0
  • 2.6.0-rc4
  • 2.6.0-rc3
  • 2.6.0-rc2
  • 2.6.0-rc
  • 2.5.0
  • 2.5.0-rc2
  • 2.5.0-rc
  • 2.4.0
  • 2.4.0-rc2
29 results

gradient_preset_widget.py

Blame
  • test_sampleinput.py 695 B
    """Tests the transcriptome abundance file input reader."""
    
    import pytest
    import pandas as pd
    
    from src.sampleinput import sample_from_input
    
    
    def test_sampleinput(tmpdir):
        """Tests the output, input file name and separator."""
        sample_from_input(
            input_file='./tests/resources/Transcript2.tsv',
            output_file=tmpdir / 'test1.csv',
            sep='\t',
            n=142958
        )
        t1=pd.read_table(tmpdir / 'test1.csv', header=None, sep=',')
        assert t1[1].sum()==142958
        with pytest.raises(IndexError):
            sample_from_input(input_file='./tests/resources/Transcript2.tsv')
        with pytest.raises(IOError):
            sample_from_input(input_file='file_not_existing.txt')