search for: test_class

Displaying 15 results from an estimated 15 matches for "test_class".

2011 Jun 16
1
Question about R.oo package
...lity of the R.oo, I found that during the first construction of a object from a class, the constructor is twice called, but only one object is finalized. In all subsequent creation processes, the constructor is (expectedly) called once. Here some example code: library(R.oo) setConstructorS3("Test_class",function(val) { cat("constructor\n") if(missing(val)) val<-NA; extend(Object(), "Test_class", .val=val) }) setMethodS3("finalize","Test_class",function(this,...) { cat("destructor\n") }) o<-Test_class(1) rm(o) gc() Is there...
2009 Nov 26
2
Puppet+Foreman: class into module couldn't apply on nodes
Hello, I try config puppet with foreman frontend. Into puppetmasterd I create modules "test" and create init.pp: # Create "/tmp/testfile" if it doesn''t exist. class test_class { file { "/tmp/testfile": ensure => present, mode => 644, owner => root, group => root } } Configure nodes in site.pp and import module: import "test" node "srv2-svc8.net.billing.ru" { include test_class } Run p...
2009 Dec 03
1
Could not retrieve catalog
...l rundir=/var/run/puppet factpath=$vardir/lib/facter pluginsync=false server=puppetmaster.domain.com [puppetmasterd] templatedir=/var/lib/puppet/templates certname=puppetmaster.domain.com Puppet Server''s site.pp file: # Create "/tmp/testfile" if it doesn''t exist. class test_class { file { "/tmp/testfile": ensure => present, mode => 644, owner => root, group => root } } # tell puppet on which client to run the class node pclient { include test_class } Client''s puppet.conf file: [main] # Where...
2007 Aug 10
1
Information when using puppetd
I''m just now getting to testing some things out with puppet and here is my first stab at it. This is in the site.pp file of the puppet server. class test_class { cron { testentry: command => "/usr/sbin/myscript.sh", user => root, hour => 2, minute => 0 } } node leestestbox { include test_class } I''m doing this all by hand, so I then run this on the puppet client box: puppe...
2012 Nov 20
1
Removing columns that are na or constant
....col) }) dataset <- dataset[!same] This works GREAT (thanks to the r-users list archive I found this) however, then when I do my data sampling like so: testSize <- floor(nrow(x) * 10/100) test <- sample(1:nrow(x), testSize) train_data <- x[-test,] test_data <- x[test, -1] test_class <- x[test, 1] It is now possible that test_data or train_data contain columns that are constants, however as one dataset they did not. So the solution for me is to just re-run lines to remove all constants......not a problem, but is this normal? is this how I should be handling this in R? ma...
2019 Nov 10
2
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
...> really use the "only truly correct" ;-) > > inherits(x, "...") > or > is(x, "....") # if you're advanced/brave enough (:-) to > # use formal classes (S4) Thanks for the helpful blog post Martin. Is the following ?test_class? %in% class(some_object) which I think in your symbols would be ??? %in% class(x) safe as far as you see it? By safe, I mean equivalent to your suggestion of inherits(x, ???) . Thanks, Bryan
2006 Jun 13
3
Dynamic determination of class under test...
I''ve been developing a series of custom assertions for testing my models and it looks like I can unify most some of the assertions if I can find a good way to determine the class under test at run-time. Now I refactor my test code rather vigorously so its not as simple as just stripping "Test" off the name of the test case class, but I have a few thoughts on a useful convention
2008 Apr 10
2
uninitialized constant Puppet::Network::Handler::FileServer::AuthStoreError ?
...uppet/ templates'' info: Starting server for Puppet version 0.22.4 info: mount[files]: denying * access uninitialized constant Puppet::Network::Handler::FileServer::AuthStoreError where # /etc/puppet/manifests/site.pp # Create "/tmp/testfile" if it doesn''t exist. class test_class { file { "/tmp/testfile": ensure => present, mode => 644, owner => root, group => root } } # tell puppet on which client to run the class node fedfan.cs { include test_class } --~--~---------~--~----~------------~-------~--~----~ Yo...
2006 Nov 21
0
[744] trunk/wxruby2: get_data support & mem mgmt to all ControlWithItems types, using more
...-11-21 19:59:03 UTC (rev 744) </span><span class="lines">@@ -0,0 +1,79 @@ </span><ins>+require ''test/unit'' +require ''test/unit/ui/console/testrunner'' +require ''wx'' + +class TestApp < Wx::App + attr_accessor :test_class + def on_init + Test::Unit::UI::Console::TestRunner.run(self.test_class) + end +end + +class CtrlContainerFrame < Wx::Frame + attr_accessor :control + def initialize(ctrl_class, *args) + super(nil, -1, ''Test '' + ctrl_class.name) + self.control = ctrl_class.new(self...
2019 Nov 11
2
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
...gt; inherits(x, "...") >>> or >>> is(x, "....") # if you're advanced/brave enough (:-) to >>> # use formal classes (S4) >> >> Thanks for the helpful blog post Martin. Is the following >> >> ?test_class? %in% class(some_object) >> >> which I think in your symbols would be >> >> ??? %in% class(x) >> >> safe as far as you see it? By safe, I mean equivalent to your suggestion of inherits(x, ???) . > Those aren't equivalent if...
2019 Nov 10
0
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
...t" ;-) >> >> inherits(x, "...") >> or >> is(x, "....") # if you're advanced/brave enough (:-) to >> # use formal classes (S4) > > Thanks for the helpful blog post Martin. Is the following > > ?test_class? %in% class(some_object) > > which I think in your symbols would be > > ??? %in% class(x) > > safe as far as you see it? By safe, I mean equivalent to your suggestion of inherits(x, ???) . Those aren't equivalent if S4 gets involved. You can see it if you run this co...
2007 May 01
7
RFC: Changing variable override
It seems like a very common expectation that the following code would work: class boo { $me = "/something" file { $me: ensure => present } } class yay inherits boo { $me = "/something/else" } Yet, as many have found to their chagrin, it does not work. Should it? I believe I know how I could make this work: Create a single variable namespace for class
2019 Nov 12
0
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
...>>> or > >>> is(x, "....") # if you're advanced/brave enough (:-) to > >>> # use formal classes (S4) > >> > >> Thanks for the helpful blog post Martin. Is the following > >> > >> ?test_class? %in% class(some_object) > >> > >> which I think in your symbols would be > >> > >> ??? %in% class(x) > >> > >> safe as far as you see it? By safe, I mean equivalent to your suggestion of inherits(x, ???) . > &...
2006 Nov 26
0
[758] trunk/wxruby2: i18n support: added Locale class, methods for get/set languages & encodings
...6-11-26 09:47:32 UTC (rev 758) </span><span class="lines">@@ -0,0 +1,100 @@ </span><ins>+require ''test/unit'' +require ''test/unit/ui/console/testrunner'' +require ''wx'' +class TestApp < Wx::App + attr_accessor :test_class + def on_init + Test::Unit::UI::Console::TestRunner.run(self.test_class) + end +end + +class TestInternationalisation < Test::Unit::TestCase + def test_encodings + default = Wx::Font.get_default_encoding + assert_kind_of(Integer, default) + assert_kind_of(String, Wx::Font.get_defa...
2019 Nov 02
6
head.matrix can return 1000s of columns -- limit to n or add new argument?
Thanks Martin and Peter, I agree that we can be careful and narrow and still see a nice improvement in behavior. While Herve's point is valid and I understand his frustration, I think staying within the matrix vs c(matrix, array) space is the right scope for this work in terms of fiddling with inheritance. As another point, I don't know off the top of my head of any other classes which