Package translate :: Package convert :: Module test_convert :: Class TestConvertCommand

[hide private]
[frames] | no frames]

# Class TestConvertCommand

source code

Known Subclasses:
  - test_prop2po.TestProp2POCommand
  - , test_po2dtd.TestPO2DTDCommand
  - , test_po2oo.TestPO2OOCommand
  - , test_po2tmx.TestPO2TMXCommand
  - , test_php2po.TestPhp2POCommand
  - , test_dtd2po.TestDTD2POCommand
  - , test_pot2po.TestPOT2POCommand
  - , test_csv2po.TestCSV2POCommand
  - , test_po2php.TestPO2PhpCommand
  - , test_moz2po.TestMoz2POCommand
  - , test_ts2po.TestTS2POCommand
  - , test_oo2xliff.TestOO2POCommand
  - , test_oo2po.TestOO2POCommand
  - , test_html2po.TestHTML2POCommand
  - , test_odf2po.TestODF2POCommand
  - , test_po2ts.TestPO2TSCommand
  - , test_po2csv.TestPO2CSVCommand
  - , test_po2moz.TestPO2MozCommand
  - , test_po2txt.TestPO2TxtCommand
  - , test_txt2po.TestTxt2POCommand
  - , test_po2prop.TestPO2PropCommand
  - , test_po2html.TestPO2HtmlCommand

Tests running actual commands on files

Instance Methods | [hide private]

setup_method(self, method) creates a clean test directory for the given method | source code

teardown_method(self, method) removes the test directory for the given method | source code

cleardir(self) removes the test directory | source code

run_command(self, *argv, **kwargs) runs the command via the main function, passing self.defaultoptions and keyword arguments as --long options and argv arguments straight | source code

get_testfilename(self, filename) gets the path to the test file | source code

open_testfile(self, filename, mode=`'``r``'`) opens the given filename in the testdirectory in the given mode | source code

create_testfile(self, filename, contents) creates the given file in the testdirectory with the given contents | source code

read_testfile(self, filename) reads the given file in the testdirectory and returns the contents | source code

help_check(self, options, option, last=False) check that a help string occurs and remove it | source code

test_help(self) tests getting help (returning the help_string so further tests can be done) | source code

Class Variables | [hide private]

| convertmodule Handles converting of files between formats (used by translate.convert tools)
| defaultoptions = ``{``'``progress``'``:` `'``none``'``,` `'``psyco``'``:` `'``none``'``}``

Class Variable Details | [hide private]

### convertmodule

Handles converting of files between formats (used by translate.convert tools)

Value:
  translate.convert.convert